Package org.ytreza.data.database.jdbc

Examples of org.ytreza.data.database.jdbc.JdbcTranslatorFields


    ResultSet peoplesSet = statement.executeQuery(queryStatement);
    return peoplesSet;
  }

  protected void initializeFromResultSet(MapOfFields map, ResultSet set) throws SQLException {
    JdbcTranslatorFields translator = new JdbcTranslatorFields(map);
    translator.initializeFromResultSet(set);
  }
View Full Code Here


  protected String getWhereIdSql(int id) {
    return "where id = " + id;
  }

  protected void update(Origin<?> origin) throws UnableToSaveException {
    JdbcTranslatorFields translator = new JdbcTranslatorFields(origin.getMapOfFields());

    String updateString = "update " + getTableName() + " " + translator.getUpdateStatement() + " " + getWhereIdSql(origin.getId());

    try {
      Connection connection = connectionManager.getConnection();
      Statement statement = connection.createStatement();
View Full Code Here

  public void updateItem(Origin<T> item) throws UnableToSaveException {
    update(item);
  }

  public void insertItem(Origin<T> origin) throws UnableToSaveException {
    JdbcTranslatorFields translator = new JdbcTranslatorFields(origin.getMapOfFields());

    String insertString = "insert into " + getTableName() + " " + translator.getInsertStatement();

    try {
      Connection connection = connectionManager.getConnection();
      Statement statement = connection.createStatement();
View Full Code Here

  public PeopleJdbcStrategy() {
  }

  @Override
  public void insertItem(Origin<People> origin) throws UnableToSaveException {
    JdbcTranslatorFields translator = new JdbcTranslatorFields(origin.getMapOfFields());

    String insertString = "insert into " + getTableName() + " " + translator.getInsertStatement();

    try {
      Connection connection = connectionManager.getConnection();
      Statement statement = connection.createStatement();
View Full Code Here

TOP

Related Classes of org.ytreza.data.database.jdbc.JdbcTranslatorFields

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.