klass.model.meta.domain.ProjectionWithAssociationEndDatabaseObjectAbstract Maven / Gradle / Ivy
The newest version!
package klass.model.meta.domain;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.*;
import java.io.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.gs.fw.common.mithra.*;
import com.gs.fw.common.mithra.attribute.*;
import com.gs.fw.common.mithra.util.*;
import com.gs.fw.common.mithra.notification.*;
import com.gs.fw.common.mithra.notification.listener.*;
import com.gs.fw.common.mithra.list.cursor.Cursor;
import com.gs.fw.common.mithra.bulkloader.*;
import java.util.*;
import java.sql.*;
import com.gs.fw.common.mithra.*;
import com.gs.fw.common.mithra.attribute.update.AttributeUpdateWrapper;
import com.gs.fw.common.mithra.bulkloader.BulkLoader;
import com.gs.fw.common.mithra.bulkloader.BulkLoaderException;
import com.gs.fw.common.mithra.cache.*;
import com.gs.fw.common.mithra.cache.offheap.*;
import com.gs.fw.common.mithra.connectionmanager.*;
import com.gs.fw.common.mithra.database.*;
import com.gs.fw.common.mithra.databasetype.*;
import com.gs.fw.common.mithra.finder.*;
import com.gs.fw.common.mithra.finder.orderby.OrderBy;
import com.gs.fw.common.mithra.finder.integer.IntegerResultSetParser;
import com.gs.fw.common.mithra.querycache.CachedQuery;
import com.gs.fw.common.mithra.remote.RemoteMithraService;
import com.gs.fw.common.mithra.transaction.BatchUpdateOperation;
import com.gs.fw.common.mithra.transaction.UpdateOperation;
/**
* This file was automatically generated using Mithra 18.0.0. Please do not modify it.
* Add custom logic to its subclass instead.
*/
public abstract class ProjectionWithAssociationEndDatabaseObjectAbstract extends MithraAbstractTransactionalDatabaseObject implements MithraTransactionalDatabaseObject, MithraObjectFactory
{
private SourcelessConnectionManager connectionManager;
private SchemaManager schemaManager;
private TablePartitionManager tablePartitionManager;
private static final String COL_LIST_WITHOUT_PK = "\"ASSOCIATION_END_CLASS\",\"ASSOCIATION_END_NAME\"";
private static final String COL_LIST_WITHOUT_PK_WITH_ALIAS = "t0.\"ASSOCIATION_END_CLASS\",t0.\"ASSOCIATION_END_NAME\"";
private static final String PK_WITH_ALIAS = "t0.\"ID\" = ?";
private static final String PK_INDEX_COLS = "\"ID\"";
protected ProjectionWithAssociationEndDatabaseObjectAbstract()
{
super("ProjectionWithAssociationEnd", "klass.model.meta.domain.ProjectionWithAssociationEndFinder",
3, 3,
COL_LIST_WITHOUT_PK, COL_LIST_WITHOUT_PK_WITH_ALIAS,
false, false, false,
PK_WITH_ALIAS,
PK_INDEX_COLS);
}
public MithraObjectPortal getMithraObjectPortal()
{
return ProjectionWithAssociationEndFinder.getMithraObjectPortal();
}
public RelatedFinder getFinder()
{
return ProjectionWithAssociationEndFinder.getFinderInstance();
}
public static ProjectionWithAssociationEndData allocateOnHeapData()
{
return new ProjectionWithAssociationEndData();
}
public static ProjectionWithAssociationEndData allocateOffHeapData()
{
throw new RuntimeException("no off heap implementation");
}
public MithraDataObject deserializeFullData(ObjectInput in) throws IOException, ClassNotFoundException
{
MithraDataObject data = new ProjectionWithAssociationEndData();
data.zDeserializeFullData(in);
return data;
}
public MithraObject deserializeForRefresh(ObjectInput in) throws IOException, ClassNotFoundException
{
ProjectionWithAssociationEndData data = new ProjectionWithAssociationEndData();
data.zDeserializePrimaryKey(in);
return this.createObject(data);
}
public Cache instantiateFullCache(MithraConfigurationManager.Config config)
{
Cache result;
if (config.isParticipatingInTx())
{
result = new FullNonDatedTransactionalCache(ProjectionWithAssociationEndFinder.getPrimaryKeyAttributes(), this, ProjectionWithAssociationEndFinder.getImmutableAttributes());
}
else
{
result = new FullNonDatedCache(ProjectionWithAssociationEndFinder.getPrimaryKeyAttributes(), this, ProjectionWithAssociationEndFinder.getImmutableAttributes(), new NonTransactionalUnderlyingObjectGetter());
}
initPortal(result, config);
return result;
}
public Cache instantiatePartialCache(MithraConfigurationManager.Config config)
{
Cache result;
if (config.isParticipatingInTx())
{
result = new PartialNonDatedTransactionalCache(ProjectionWithAssociationEndFinder.getPrimaryKeyAttributes(), this, ProjectionWithAssociationEndFinder.getImmutableAttributes(), config.getCacheTimeToLive(), config.getRelationshipCacheTimeToLive());
}
else
{
result = new PartialNonDatedCache(ProjectionWithAssociationEndFinder.getPrimaryKeyAttributes(), this, ProjectionWithAssociationEndFinder.getImmutableAttributes(), new NonTransactionalUnderlyingObjectGetter(), config.getCacheTimeToLive(), config.getRelationshipCacheTimeToLive());
}
initPortal(result, config);
return result;
}
private void initPortal(Cache cache, MithraConfigurationManager.Config config)
{
if (config.isThreeTierClient())
{
ProjectionWithAssociationEndFinder.initializeClientPortal(this, cache, config);
}
else
{
ProjectionWithAssociationEndFinder.initializePortal(this, cache, config);
}
if (config.isParticipatingInTx())
{
ProjectionWithAssociationEnd.zConfigFullTx();
}
else
{
ProjectionWithAssociationEnd.zConfigNonTx();
}
}
public List getSimulatedSequenceInitValues()
{
return null;
}
public Object getSourceAttributeValueForSelectedObjectGeneric(SqlQuery query, int queryNumber)
{
return null;
}
public Object getSourceAttributeValueFromObjectGeneric(MithraDataObject object)
{
return null;
}
public Object getSourceAttributeValueGeneric(SqlQuery query, MapperStackImpl mapperStack, int queryNumber)
{
return null;
}
public String getDatabaseIdentifierGenericSource (Object source)
{
return connectionManager.getDatabaseIdentifier();
}
public DatabaseType getDatabaseTypeGenericSource(Object source)
{
return connectionManager.getDatabaseType();
}
public TimeZone getDatabaseTimeZoneGenericSource(Object source)
{
return getDatabaseTimeZone();
}
public Connection getConnectionGenericSource(Object source)
{
return connectionManagerWrapper.getConnection();
}
public BulkLoader createBulkLoaderGenericSource(Object source) throws BulkLoaderException
{
return connectionManager.createBulkLoader();
}
public MithraDataObject inflateDataGenericSource(ResultSet rs, Object source, DatabaseType dt)
throws SQLException
{
return inflateProjectionWithAssociationEndData(rs, dt);
}
public void inflateNonPkDataGenericSource(MithraDataObject data, ResultSet rs, Object source, DatabaseType dt)
throws SQLException
{
inflateNonPkProjectionWithAssociationEndData(1, (ProjectionWithAssociationEndData) data, rs, dt);
}
public MithraDataObject inflatePkDataGenericSource(ResultSet rs, Object source, DatabaseType dt)
throws SQLException
{
return inflateProjectionWithAssociationEndPkData(rs, dt);
}
public String getSchemaGenericSource(Object source)
{
if (this.schemaManager != null)
{
return this.schemaManager.getSchema(this.getDefaultSchema());
}
return this.getDefaultSchema();
}
public String getTableNameGenericSource(Object source) throws MithraDatabaseException
{
return getProjectionWithAssociationEndTableName();
}
public String getProjectionWithAssociationEndTableName() throws MithraDatabaseException
{
if (this.tablePartitionManager != null)
{
return this.tablePartitionManager.getTableName(this.getDefaultTableName());
}
return this.getDefaultTableName();
}
public void setPrimaryKeyAttributes(PreparedStatement stm, int pos, MithraDataObject dataObj,
TimeZone databaseTimeZone, DatabaseType dt) throws SQLException
{
ProjectionWithAssociationEndData data = (ProjectionWithAssociationEndData)dataObj;
TimeZone conversionTimeZone = null;
stm.setLong(pos++, data.getId());
}
public int setPrimaryKeyAttributesWithoutOptimistic(PreparedStatement stm, int pos, MithraDataObject dataObj,
TimeZone databaseTimeZone, DatabaseType dt) throws SQLException
{
this.setPrimaryKeyAttributes(stm, pos, dataObj, databaseTimeZone, dt);
return -1;
}
public String getPrimaryKeyWhereSql()
{
return "\"ID\" = ?";
}
public String getPrimaryKeyWhereSqlWithNullableAttribute(MithraDataObject dataObj)
{
return "";
}
public String getPrimaryKeyWhereSqlWithNullableAttributeWithDefaultAlias(MithraDataObject dataObj)
{
return "";
}
public String getColumnListWithPk(String databaseAlias)
{
if (databaseAlias.equals(SqlQuery.DEFAULT_DATABASE_ALIAS))
{
return "t0.\"ID\",t0.\"ASSOCIATION_END_CLASS\",t0.\"ASSOCIATION_END_NAME\"";
}
StringBuffer result = new StringBuffer((databaseAlias.length()+15)*3);
result.append(databaseAlias).append(".").append("\"ID\"");
result.append(",").append(databaseAlias).append(".").append("\"ASSOCIATION_END_CLASS\"");
result.append(",").append(databaseAlias).append(".").append("\"ASSOCIATION_END_NAME\"");
return result.toString();
}
public Object getConnectionManager()
{
return connectionManager;
}
public void setConnectionManager(Object connectionManager, ConnectionManagerWrapper wrapper)
{
this.connectionManager = (SourcelessConnectionManager)connectionManager;
this.connectionManagerWrapper = wrapper;
}
public ProjectionWithAssociationEndData inflateProjectionWithAssociationEndData(ResultSet rs, DatabaseType dt)
throws SQLException
{
ProjectionWithAssociationEndData data = inflateProjectionWithAssociationEndPkData(rs, dt);
inflateNonPkProjectionWithAssociationEndData(2, data, rs, dt);
return data;
}
public ProjectionWithAssociationEndData inflateProjectionWithAssociationEndPkData(ResultSet _rs, DatabaseType _dt)
throws SQLException
{
ProjectionWithAssociationEndData _data = new ProjectionWithAssociationEndData();
int _pos = 1;
_data.setId(_rs.getLong(_pos++));
checkNullPrimitive(_rs, _data, "id");
return _data;
}
public void inflateNonPkProjectionWithAssociationEndData(int _pos, ProjectionWithAssociationEndData _datax, ResultSet _rs, DatabaseType _dt)
throws SQLException
{
{
ProjectionWithAssociationEndData _data = _datax;
_data.setAssociationEndClass((_rs.getString(_pos++)));
_data.setAssociationEndName((_rs.getString(_pos++)));
}
}
public DatabaseType getDatabaseType()
{
return connectionManager.getDatabaseType();
}
public TimeZone getDatabaseTimeZone()
{
return connectionManager.getDatabaseTimeZone();
}
protected String getSchema()
{
return this.getSchemaGenericSource(null);
}
public void setSchemaManager(Object schemaManager)
{
if( schemaManager instanceof SchemaManager )
{
this.schemaManager = (SchemaManager) schemaManager;
}
else
{
throw new IllegalArgumentException( "Schema manager class " + schemaManager.getClass().getName()
+ " does not implement SchemaManager.class" );
}
}
public void setTablePartitionManager(Object tablePartitionManager)
{
if( tablePartitionManager instanceof TablePartitionManager )
{
this.tablePartitionManager = (TablePartitionManager) tablePartitionManager;
}
else
{
throw new IllegalArgumentException( "Table partition manager class " + tablePartitionManager.getClass().getName()
+ " does not implement TablePartitionManager.class" );
}
}
public String getTableName()
{
return this.getDefaultTableName();
}
public String getDefaultTableName()
{
return "\"PROJECTION_WITH_ASSOCIATION_END\"";
}
public void setInsertAttributes(PreparedStatement stm, MithraDataObject dataObj,
TimeZone databaseTimeZone, int pos, DatabaseType dt) throws SQLException
{
ProjectionWithAssociationEndData data = (ProjectionWithAssociationEndData)dataObj;
TimeZone conversionTimeZone = null;
stm.setLong(pos++, data.getId());
if(data.isAssociationEndClassNull())
{
throwNullAttribute("associationEndClass");
}
stm.setString(pos++, data.getAssociationEndClass());
if(data.isAssociationEndNameNull())
{
throwNullAttribute("associationEndName");
}
stm.setString(pos++, data.getAssociationEndName());
}
public String getInsertFields()
{
return "\"ID\",\"ASSOCIATION_END_CLASS\",\"ASSOCIATION_END_NAME\"";
}
public String getInsertQuestionMarks()
{
return "?,?,?";
}
public String getOptimisticLockingWhereSql()
{
return "";
}
public MithraObject createObject(MithraDataObject newData)
{
ProjectionWithAssociationEnd newObject = new ProjectionWithAssociationEnd();
newObject.zSetFromProjectionWithAssociationEndData((ProjectionWithAssociationEndData) newData);
return newObject;
}
public String getPkColumnList(String databaseAlias)
{
if (databaseAlias.equals(SqlQuery.DEFAULT_DATABASE_ALIAS))
{
return "t0.\"ID\"";
}
StringBuffer result = new StringBuffer((databaseAlias.length()+15)*3);
result.append(databaseAlias);
result.append(".");
result.append("\"ID\"");
return result.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy