/* * WebUserActions.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 WebUserActions extends com.evolute.entity.evo.EvoDataObject { private static final java.util.HashMap FIELD_INDEXES = new java.util.HashMap(); static { FIELD_INDEXES.put( WebUserActions.ID, WebUserActions.ID_INDEX ); FIELD_INDEXES.put( WebUserActions.ID_FULL, WebUserActions.ID_INDEX ); FIELD_INDEXES.put( WebUserActions.CREATED_STAMP, WebUserActions.CREATED_STAMP_INDEX ); FIELD_INDEXES.put( WebUserActions.CREATED_STAMP_FULL, WebUserActions.CREATED_STAMP_INDEX ); com.evolute.entity.evo.EvoDataObject.register( WebUserActions.CLASS_IDENTIFIER, WebUserActions.USER_ID, WebUserActions.TO_USER_ID ); FIELD_INDEXES.put( WebUserActions.USER_ID, WebUserActions.USER_ID_INDEX ); FIELD_INDEXES.put( WebUserActions.USER_ID_FULL, WebUserActions.USER_ID_INDEX ); FIELD_INDEXES.put( WebUserActions.TO_USER_ID, WebUserActions.TO_USER_ID_INDEX ); FIELD_INDEXES.put( WebUserActions.ACTION_NAME, WebUserActions.ACTION_NAME_INDEX ); FIELD_INDEXES.put( WebUserActions.ACTION_NAME_FULL, WebUserActions.ACTION_NAME_INDEX ); FIELD_INDEXES.put( WebUserActions.ACTION_DESCRIPTION, WebUserActions.ACTION_DESCRIPTION_INDEX ); FIELD_INDEXES.put( WebUserActions.ACTION_DESCRIPTION_FULL, WebUserActions.ACTION_DESCRIPTION_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( WebUserActions.class, WebUserActions.USER_ID, db.data.siprp_local.outer.EvoUsrUserData.class, db.data.siprp_local.outer.EvoUsrUserData.ID ); public static final String TABLENAME = "web_user_actions"; public static final String CLASS_IDENTIFIER = "db.data.siprp_local.inner.web_user_actions"; public static final int _INVALID__INDEX = -1; public static final String ID = "id"; public static final String ID_FULL = "web_user_actions.id"; public static final int ID_INDEX = 0; public static final String CREATED_STAMP = "created_stamp"; public static final String CREATED_STAMP_FULL = "web_user_actions.created_stamp"; public static final int CREATED_STAMP_INDEX = 1; public static final String USER_ID = "user_id"; public static final String USER_ID_FULL = "web_user_actions.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 = "web_user_actions.to_user_id"; public static final int TO_USER_ID_INDEX = 3; public static final String ACTION_NAME = "action_name"; public static final String ACTION_NAME_FULL = "web_user_actions.action_name"; public static final int ACTION_NAME_INDEX = 4; public static final String ACTION_DESCRIPTION = "action_description"; public static final String ACTION_DESCRIPTION_FULL = "web_user_actions.action_description"; public static final int ACTION_DESCRIPTION_INDEX = 5; public static final String FIELD_NAMES[] = new String[]{ CREATED_STAMP, USER_ID, TO_USER_ID, ACTION_NAME, ACTION_DESCRIPTION, }; public static final String FIELD_NAMES_FULL[] = new String[]{ TABLENAME + "." + CREATED_STAMP, TABLENAME + "." + USER_ID, TABLENAME + "." + TO_USER_ID, TABLENAME + "." + ACTION_NAME, TABLENAME + "." + ACTION_DESCRIPTION, }; protected static final String DB_FIELD_NAMES[] = new String[]{ ID, CREATED_STAMP, USER_ID, ACTION_NAME, ACTION_DESCRIPTION, }; protected static final String PK_FIELD_NAMES[] = new String[]{ ID, }; public static final String DEFAULT_LOAD_SET[] = new String[] { ID, CREATED_STAMP, USER_ID, ACTION_NAME, ACTION_DESCRIPTION, }; private Integer id; private Timestamp created_stamp; private Integer user_id; private db.data.siprp_local.outer.EvoUsrUserData to_user_id; private String action_name; private String action_description; protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey; public WebUserActions() { 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 getCreated_stamp() { try { setLastAccess( System.currentTimeMillis() ); prepare( CREATED_STAMP ); } catch( java.lang.Exception ex ) { throw new RuntimeException( ex ); } return this.created_stamp; } public void setCreated_stamp( Timestamp created_stamp ) { try { preProcess( CREATED_STAMP, created_stamp ); } catch( com.evolute.entity.evo.EvoDataException edex ) { throw new RuntimeException( edex ); } this.created_stamp = created_stamp; LAZY_LOADED_OBJECTS.put( CREATED_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 getAction_name() { try { setLastAccess( System.currentTimeMillis() ); prepare( ACTION_NAME ); } catch( java.lang.Exception ex ) { throw new RuntimeException( ex ); } return this.action_name; } public void setAction_name( String action_name ) { try { preProcess( ACTION_NAME, action_name ); } catch( com.evolute.entity.evo.EvoDataException edex ) { throw new RuntimeException( edex ); } this.action_name = action_name; LAZY_LOADED_OBJECTS.put( ACTION_NAME, Boolean.TRUE ); } public String getAction_description() { try { setLastAccess( System.currentTimeMillis() ); prepare( ACTION_DESCRIPTION ); } catch( java.lang.Exception ex ) { throw new RuntimeException( ex ); } return this.action_description; } public void setAction_description( String action_description ) { try { preProcess( ACTION_DESCRIPTION, action_description ); } catch( com.evolute.entity.evo.EvoDataException edex ) { throw new RuntimeException( edex ); } this.action_description = action_description; LAZY_LOADED_OBJECTS.put( ACTION_DESCRIPTION, Boolean.TRUE ); } public Object get( String fieldName ) { Object value = null; Integer index = getFieldIndex( fieldName ); switch( index ) { case WebUserActions.ID_INDEX: value = getId(); break; case WebUserActions.CREATED_STAMP_INDEX: value = getCreated_stamp(); break; case WebUserActions.USER_ID_INDEX: value = getUser_id(); break; case WebUserActions.TO_USER_ID_INDEX: value = toUser_id(); break; case WebUserActions.ACTION_NAME_INDEX: value = getAction_name(); break; case WebUserActions.ACTION_DESCRIPTION_INDEX: value = getAction_description(); break; } return value; } public Object rawGet( String fieldName ) { Object value = null; Integer index = getFieldIndex( fieldName ); switch( index ) { case WebUserActions.ID_INDEX: value = this.id; break; case WebUserActions.CREATED_STAMP_INDEX: value = this.created_stamp; break; case WebUserActions.USER_ID_INDEX: value = this.user_id; break; case WebUserActions.TO_USER_ID_INDEX: value = this.to_user_id; break; case WebUserActions.ACTION_NAME_INDEX: value = this.action_name; break; case WebUserActions.ACTION_DESCRIPTION_INDEX: value = this.action_description; break; } return value; } public void set( String fieldName, Object value ) { Integer index = getFieldIndex( fieldName ); switch( index ) { case WebUserActions.ID_INDEX: setId( ( Integer ) value ); break; case WebUserActions.CREATED_STAMP_INDEX: setCreated_stamp( ( Timestamp ) value ); break; case WebUserActions.USER_ID_INDEX: setUser_id( ( Integer ) value ); break; case WebUserActions.TO_USER_ID_INDEX: setToUser_id( ( db.data.siprp_local.outer.EvoUsrUserData ) value ); break; case WebUserActions.ACTION_NAME_INDEX: setAction_name( ( String ) value ); break; case WebUserActions.ACTION_DESCRIPTION_INDEX: setAction_description( ( String ) value ); break; } } public void rawSet( String fieldName, Object value ) { Integer index = getFieldIndex( fieldName ); switch( index ) { case WebUserActions.ID_INDEX: this.id = ( Integer ) value; break; case WebUserActions.CREATED_STAMP_INDEX: this.created_stamp = ( Timestamp ) value; break; case WebUserActions.USER_ID_INDEX: this.user_id = ( Integer ) value; break; case WebUserActions.TO_USER_ID_INDEX: this.to_user_id = ( db.data.siprp_local.outer.EvoUsrUserData ) value; break; case WebUserActions.ACTION_NAME_INDEX: this.action_name = ( String ) value; break; case WebUserActions.ACTION_DESCRIPTION_INDEX: this.action_description = ( 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 WebUserActions.ID_INDEX: theClass = Integer.class; break; case WebUserActions.CREATED_STAMP_INDEX: theClass = Timestamp.class; break; case WebUserActions.USER_ID_INDEX: theClass = Integer.class; break; case WebUserActions.TO_USER_ID_INDEX: theClass = db.data.siprp_local.outer.EvoUsrUserData.class; break; case WebUserActions.ACTION_NAME_INDEX: theClass = String.class; break; case WebUserActions.ACTION_DESCRIPTION_INDEX: theClass = String.class; break; } return theClass; } public Integer getFieldIndex( String fieldName ) { Integer index = FIELD_INDEXES.get( fieldName ); return index != null ? index : WebUserActions._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, WebUserActions.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 ); } } }