forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
493 lines
12 KiB
493 lines
12 KiB
/*
|
|
* EvoUsrPreferences.java
|
|
*
|
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
|
*
|
|
* Use but DON'T TOUCH
|
|
* -> (can't touch this)
|
|
*/
|
|
package db.data.siprp_local.inner;
|
|
|
|
import java.sql.Timestamp;
|
|
|
|
public class EvoUsrPreferences extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
|
|
{
|
|
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
|
|
|
|
static
|
|
{
|
|
FIELD_INDEXES.put( EvoUsrPreferences.ID, EvoUsrPreferences.ID_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.ID_FULL, EvoUsrPreferences.ID_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.DELETED_STAMP, EvoUsrPreferences.DELETED_STAMP_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.DELETED_STAMP_FULL, EvoUsrPreferences.DELETED_STAMP_INDEX );
|
|
com.evolute.entity.evo.EvoDataObject.register( EvoUsrPreferences.CLASS_IDENTIFIER, EvoUsrPreferences.USER_ID, EvoUsrPreferences.TO_USER_ID );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.USER_ID, EvoUsrPreferences.USER_ID_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.USER_ID_FULL, EvoUsrPreferences.USER_ID_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.TO_USER_ID, EvoUsrPreferences.TO_USER_ID_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.PROPERTY, EvoUsrPreferences.PROPERTY_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.PROPERTY_FULL, EvoUsrPreferences.PROPERTY_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.VALUE, EvoUsrPreferences.VALUE_INDEX );
|
|
FIELD_INDEXES.put( EvoUsrPreferences.VALUE_FULL, EvoUsrPreferences.VALUE_INDEX );
|
|
}
|
|
|
|
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
|
|
|
|
|
public static final com.evolute.entity.ForeignKey ForeignKeyuser_idToevo_usr_user =
|
|
new com.evolute.entity.ForeignKey( EvoUsrPreferences.class, EvoUsrPreferences.USER_ID, db.data.siprp_local.outer.EvoUsrUserData.class, db.data.siprp_local.outer.EvoUsrUserData.ID );
|
|
|
|
public static final String TABLENAME = "evo_usr_preferences";
|
|
|
|
|
|
public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.evo_usr_preferences";
|
|
|
|
public static final int _INVALID__INDEX = -1;
|
|
public static final String ID = "id";
|
|
public static final String ID_FULL = "evo_usr_preferences.id";
|
|
public static final int ID_INDEX = 0;
|
|
public static final String DELETED_STAMP = "deleted_stamp";
|
|
public static final String DELETED_STAMP_FULL = "evo_usr_preferences.deleted_stamp";
|
|
public static final int DELETED_STAMP_INDEX = 1;
|
|
public static final String USER_ID = "user_id";
|
|
public static final String USER_ID_FULL = "evo_usr_preferences.user_id";
|
|
public static final int USER_ID_INDEX = 2;
|
|
public static final String TO_USER_ID = "to_user_id";
|
|
public static final String TO_USER_ID_FULL = "evo_usr_preferences.to_user_id";
|
|
public static final int TO_USER_ID_INDEX = 3;
|
|
public static final String PROPERTY = "property";
|
|
public static final String PROPERTY_FULL = "evo_usr_preferences.property";
|
|
public static final int PROPERTY_INDEX = 4;
|
|
public static final String VALUE = "value";
|
|
public static final String VALUE_FULL = "evo_usr_preferences.value";
|
|
public static final int VALUE_INDEX = 5;
|
|
|
|
public static final String FIELD_NAMES[] = new String[]{
|
|
DELETED_STAMP, USER_ID, TO_USER_ID, PROPERTY, VALUE, };
|
|
|
|
public static final String FIELD_NAMES_FULL[] = new String[]{
|
|
TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + USER_ID, TABLENAME + "." + TO_USER_ID, TABLENAME + "." + PROPERTY, TABLENAME + "." + VALUE, };
|
|
|
|
protected static final String DB_FIELD_NAMES[] = new String[]{
|
|
ID, DELETED_STAMP, USER_ID, PROPERTY, VALUE, };
|
|
|
|
|
|
protected static final String PK_FIELD_NAMES[] = new String[]{
|
|
ID, };
|
|
|
|
|
|
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
|
ID, DELETED_STAMP, USER_ID, PROPERTY, VALUE, };
|
|
|
|
private Integer id;
|
|
private Timestamp deleted_stamp;
|
|
private Integer user_id;
|
|
private db.data.siprp_local.outer.EvoUsrUserData to_user_id;
|
|
private String property;
|
|
private String value;
|
|
|
|
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
|
|
|
public EvoUsrPreferences()
|
|
{
|
|
super();
|
|
dirtyProperties = new boolean[]{ false, false, false
|
|
, false, false, false };
|
|
}
|
|
|
|
public Integer getId()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( ID );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.id;
|
|
}
|
|
|
|
public void setId( Integer id )
|
|
{
|
|
try
|
|
{
|
|
preProcess( ID, id );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.id = id;
|
|
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
|
|
}
|
|
|
|
public Timestamp getDeleted_stamp()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( DELETED_STAMP );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.deleted_stamp;
|
|
}
|
|
|
|
public void setDeleted_stamp( Timestamp deleted_stamp )
|
|
{
|
|
try
|
|
{
|
|
preProcess( DELETED_STAMP, deleted_stamp );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.deleted_stamp = deleted_stamp;
|
|
LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE );
|
|
}
|
|
|
|
public Integer getUser_id()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( USER_ID );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.user_id;
|
|
}
|
|
|
|
public void setUser_id( Integer user_id )
|
|
{
|
|
try
|
|
{
|
|
preProcess( USER_ID, user_id );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.user_id = user_id;
|
|
LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE );
|
|
}
|
|
|
|
public db.data.siprp_local.outer.EvoUsrUserData toUser_id()
|
|
{
|
|
try
|
|
{
|
|
prepare( TO_USER_ID );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
return this.to_user_id;
|
|
}
|
|
|
|
public void setToUser_id( db.data.siprp_local.outer.EvoUsrUserData to_user_id )
|
|
{
|
|
try
|
|
{
|
|
preProcess( TO_USER_ID, to_user_id );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.to_user_id = to_user_id;
|
|
}
|
|
|
|
public String getProperty()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( PROPERTY );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.property;
|
|
}
|
|
|
|
public void setProperty( String property )
|
|
{
|
|
try
|
|
{
|
|
preProcess( PROPERTY, property );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.property = property;
|
|
LAZY_LOADED_OBJECTS.put( PROPERTY, Boolean.TRUE );
|
|
}
|
|
|
|
public String getValue()
|
|
{
|
|
try
|
|
{
|
|
setLastAccess( System.currentTimeMillis() );
|
|
prepare( VALUE );
|
|
}
|
|
catch( java.lang.Exception ex )
|
|
{
|
|
throw new RuntimeException( ex );
|
|
}
|
|
return this.value;
|
|
}
|
|
|
|
public void setValue( String value )
|
|
{
|
|
try
|
|
{
|
|
preProcess( VALUE, value );
|
|
}
|
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
|
{
|
|
throw new RuntimeException( edex );
|
|
}
|
|
this.value = value;
|
|
LAZY_LOADED_OBJECTS.put( VALUE, Boolean.TRUE );
|
|
}
|
|
|
|
public Object get( String fieldName )
|
|
{
|
|
Object value = null;
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case EvoUsrPreferences.ID_INDEX:
|
|
value = getId();
|
|
break;
|
|
case EvoUsrPreferences.DELETED_STAMP_INDEX:
|
|
value = getDeleted_stamp();
|
|
break;
|
|
case EvoUsrPreferences.USER_ID_INDEX:
|
|
value = getUser_id();
|
|
break;
|
|
case EvoUsrPreferences.TO_USER_ID_INDEX:
|
|
value = toUser_id();
|
|
break;
|
|
case EvoUsrPreferences.PROPERTY_INDEX:
|
|
value = getProperty();
|
|
break;
|
|
case EvoUsrPreferences.VALUE_INDEX:
|
|
value = getValue();
|
|
break;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public Object rawGet( String fieldName )
|
|
{
|
|
Object value = null;
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case EvoUsrPreferences.ID_INDEX:
|
|
value = this.id;
|
|
break;
|
|
case EvoUsrPreferences.DELETED_STAMP_INDEX:
|
|
value = this.deleted_stamp;
|
|
break;
|
|
case EvoUsrPreferences.USER_ID_INDEX:
|
|
value = this.user_id;
|
|
break;
|
|
case EvoUsrPreferences.TO_USER_ID_INDEX:
|
|
value = this.to_user_id;
|
|
break;
|
|
case EvoUsrPreferences.PROPERTY_INDEX:
|
|
value = this.property;
|
|
break;
|
|
case EvoUsrPreferences.VALUE_INDEX:
|
|
value = this.value;
|
|
break;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
public void set( String fieldName, Object value )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case EvoUsrPreferences.ID_INDEX:
|
|
setId( ( Integer ) value );
|
|
break;
|
|
case EvoUsrPreferences.DELETED_STAMP_INDEX:
|
|
setDeleted_stamp( ( Timestamp ) value );
|
|
break;
|
|
case EvoUsrPreferences.USER_ID_INDEX:
|
|
setUser_id( ( Integer ) value );
|
|
break;
|
|
case EvoUsrPreferences.TO_USER_ID_INDEX:
|
|
setToUser_id( ( db.data.siprp_local.outer.EvoUsrUserData ) value );
|
|
break;
|
|
case EvoUsrPreferences.PROPERTY_INDEX:
|
|
setProperty( ( String ) value );
|
|
break;
|
|
case EvoUsrPreferences.VALUE_INDEX:
|
|
setValue( ( String ) value );
|
|
break;
|
|
}
|
|
}
|
|
|
|
public void rawSet( String fieldName, Object value )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
switch( index )
|
|
{
|
|
case EvoUsrPreferences.ID_INDEX:
|
|
this.id = ( Integer ) value;
|
|
break;
|
|
case EvoUsrPreferences.DELETED_STAMP_INDEX:
|
|
this.deleted_stamp = ( Timestamp ) value;
|
|
break;
|
|
case EvoUsrPreferences.USER_ID_INDEX:
|
|
this.user_id = ( Integer ) value;
|
|
break;
|
|
case EvoUsrPreferences.TO_USER_ID_INDEX:
|
|
this.to_user_id = ( db.data.siprp_local.outer.EvoUsrUserData ) value;
|
|
break;
|
|
case EvoUsrPreferences.PROPERTY_INDEX:
|
|
this.property = ( String ) value;
|
|
break;
|
|
case EvoUsrPreferences.VALUE_INDEX:
|
|
this.value = ( String ) value;
|
|
break;
|
|
}
|
|
}
|
|
|
|
public String []getFieldNames()
|
|
{
|
|
return FIELD_NAMES;
|
|
}
|
|
|
|
public String []getFieldNamesFull()
|
|
{
|
|
return FIELD_NAMES_FULL;
|
|
}
|
|
|
|
public String []getDBFieldNames()
|
|
{
|
|
return DB_FIELD_NAMES;
|
|
}
|
|
|
|
public String []getPrimaryKeyNames()
|
|
{
|
|
return PK_FIELD_NAMES;
|
|
}
|
|
|
|
public String []getDefaultLoadSet()
|
|
{
|
|
return DEFAULT_LOAD_SET;
|
|
}
|
|
|
|
public String getPrimaryKeyName()
|
|
{
|
|
return PK_FIELD_NAMES[ 0 ];
|
|
}
|
|
|
|
public Class<?> getFieldClass( String fieldName )
|
|
{
|
|
Integer index = getFieldIndex( fieldName );
|
|
Class<?> theClass = null;
|
|
switch( index )
|
|
{
|
|
case EvoUsrPreferences.ID_INDEX:
|
|
theClass = Integer.class;
|
|
break;
|
|
case EvoUsrPreferences.DELETED_STAMP_INDEX:
|
|
theClass = Timestamp.class;
|
|
break;
|
|
case EvoUsrPreferences.USER_ID_INDEX:
|
|
theClass = Integer.class;
|
|
break;
|
|
case EvoUsrPreferences.TO_USER_ID_INDEX:
|
|
theClass = db.data.siprp_local.outer.EvoUsrUserData.class;
|
|
break;
|
|
case EvoUsrPreferences.PROPERTY_INDEX:
|
|
theClass = String.class;
|
|
break;
|
|
case EvoUsrPreferences.VALUE_INDEX:
|
|
theClass = String.class;
|
|
break;
|
|
}
|
|
return theClass;
|
|
}
|
|
|
|
public Integer getFieldIndex( String fieldName )
|
|
{
|
|
Integer index = FIELD_INDEXES.get( fieldName );
|
|
return index != null ? index : EvoUsrPreferences._INVALID__INDEX;
|
|
}
|
|
|
|
public String getTableName()
|
|
{
|
|
return TABLENAME;
|
|
}
|
|
|
|
public String getClassIdentifier()
|
|
{
|
|
return CLASS_IDENTIFIER;
|
|
}
|
|
|
|
@Override
|
|
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
|
|
{
|
|
if( primaryKey == null )
|
|
{
|
|
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, EvoUsrPreferences.PK_FIELD_NAMES );
|
|
Object idObject = array.get( row, col + 0 );
|
|
try
|
|
{
|
|
primaryKey.set( 0, ( Integer ) idObject );
|
|
setId( ( Integer ) idObject );
|
|
}
|
|
catch( ClassCastException ex )
|
|
{
|
|
if( idObject instanceof Number )
|
|
{
|
|
primaryKey.set( 0, ((Number)idObject).intValue() );
|
|
setId( ((Number)idObject).intValue() );
|
|
}
|
|
else {
|
|
throw ex;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
|
|
{
|
|
return primaryKey;
|
|
}
|
|
|
|
public void initLazyLoadFields()
|
|
{
|
|
}
|
|
|
|
public boolean isPropertyLoaded( String fieldName )
|
|
{
|
|
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return LAZY_LOADED_OBJECTS.get( fieldName );
|
|
}
|
|
}
|
|
}
|