ChangeLog.java 1.91 KB
package it.softecspa.fileproxy.db;
/*
 * @(#)ChangeLog.java	1.7.1,126 custom	2014-06-15T22:00:00Z UTC
 * Built automatically by REVERSER
 */

import it.softecspa.database.dbconnect.ConnectionManager;
import it.softecspa.database.dbconnect.DatabaseStatement;
import it.softecspa.database.dbconnect.NoRecordFoundException;
import it.softecspa.fileproxy.db.criterias.ChangeLogCriteria;
import it.softecspa.kahuna.sql.SqlWriter;

import java.sql.SQLException;

/**
 * Customizable manager for table A001_CHANGE_LOG
 * Class auto generated by REVERSER, version 1.7.1,126 custom
 * 
 * @author il Vera
 */
public class ChangeLog extends it.softecspa.fileproxy.db.skins.ChangeLogSkin {

	public ChangeLog() {
		super();
	}

	/**
	 * Extract bean using key
	 */
	public ChangeLog(ConnectionManager cm, String code) throws NoRecordFoundException, SQLException {
		super(cm, code);
	}

	/**
	 * Execute select * with criteria
	 * @throws SQLException if there is an error in your query
	 */
	public static ChangeLog[] select(ChangeLogCriteria criteria) throws SQLException {
		SqlWriter sql = criteria.getSelect();
		return (ChangeLog[])(new ChangeLog()).getRows(criteria.getConnectionManager(), sql.costruisciSelect());
	}

	/**
	 * Customizable update method
	 * @param updateType operation to execute
	 * @param dbs DatabaseStatement that perform operation
	 * @return number of update rows or new autoincrement id
	 * @throws SQLException if there is an error in your query
	 */
	@Override
	public int updateRecord(UpdateType updateType, DatabaseStatement dbs) throws SQLException {
		// Insert here your custom code
		return super.updateRecord(updateType, dbs);
	}
	
	@Override
	public ChangeLog clone() {
		try {
			ChangeLog c = (ChangeLog) super.clone();
			// Insert custom clonable objects
			return c;
		} catch (CloneNotSupportedException e) {
			throw new RuntimeException(e);
		}
	}

}