All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gu.sql2java.UnnameRow Maven / Gradle / Ivy

There is a newer version: 5.3.2
Show newest version
package gu.sql2java;

class UnnameRow extends BaseRow {

	private final Object[] values;
	UnnameRow(RowMetaData metaData) {
		super(metaData);
		this.values = new Object[metaData.defaultColumnIdList.length];
	}

	@Override
	public boolean isNew() {
		return false;
	}
	
	@Override
	public void setNew(boolean isNew) {

	}
	
	@Override
	public int getInitialized() {
		return 0xffffffff;
	}
	
	@Override
	public void setInitialized(int initialized) {
	}
	@Override
	public int getModified() {
		return 0;
	}
	@Override
	public void setModified(int modified) {
	}
	@Override
	public void resetIsModified() {
	}
	
	@Override
	public void resetPrimaryKeysModified() {

	}
	
	@Override
	public boolean beModified() {
		return false;
	}
	
	@Override
	public final boolean isInitialized(int columnID) {
		return columnID>=0 && columnID < metaData.columnCount;
	}

	@Override
	public final boolean isModified(int columnID) {
		return false;
	}

	@Override
	public boolean isModified(String column) {
		return false;
	}

	@SuppressWarnings("unchecked")
	@Override
	public final  T getValue(int columnID) {
		try{
			return (T) values[columnID];
		} catch (IndexOutOfBoundsException e) {
			return null;
		}
	}

	@Override
	public final  void setValue(int columnID, T value) {
		try{
			values[columnID] = value;
		} catch (IndexOutOfBoundsException e) {
		}
	}

	@Override
	public Object[] asValueArray(int...columnIds){
		if(null == columnIds || columnIds.length == 0){
			return values;
		}
		return super.asValueArray(columnIds);
	}

	@Override
	public UnnameRow clone(){
		return (UnnameRow) super.clone();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy