public abstract class TemplateData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ColumnAliasType |
columnAliasType
Specifies column alias type.
|
protected int |
columnCount
Column counter for COLUMN_CODE column alias type.
|
protected java.util.Map<java.lang.String,ColumnData> |
columnData
Column or table aliases.
|
protected ColumnAliasType |
defaultColumnAliasType |
protected DbEntityManager |
entityManager |
protected int |
hintCount |
protected java.util.List<java.lang.String> |
hints |
DbEntityColumnDescriptor |
lastColumnDec |
protected java.util.Map<java.lang.String,java.lang.Object> |
objectRefs |
protected int |
paramCount |
protected java.util.Map<java.lang.String,ParameterValue> |
parameters |
protected java.util.Map<java.lang.String,jodd.db.oom.sqlgen.TemplateData.TableRefData> |
tableRefs |
Modifier | Constructor and Description |
---|---|
protected |
TemplateData(DbOom dbOom) |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(java.lang.String name,
java.lang.Object value,
DbEntityColumnDescriptor dec)
Adds query parameter.
|
protected void |
defineParameter(java.lang.StringBuilder query,
java.lang.String name,
java.lang.Object value)
Defines parameter with name and its value.
|
DbEntityDescriptor |
findTableDescriptorByColumnRef(java.lang.String columnRef)
Finds entity descriptor of a table that contains provided column reference.
|
ColumnAliasType |
getColumnAliasType()
Returns column alias type.
|
java.lang.String |
getNextParameterName()
Returns the next auto-generated parameter name.
|
java.lang.Object |
getObjectReference(java.lang.String name)
Returns object reference.
|
java.lang.String |
getTableAlias(java.lang.String tableRef)
Returns table alias for provided table reference.
|
DbEntityDescriptor |
getTableDescriptor(java.lang.String tableRef)
Returns entity descriptor for provided table reference.
|
boolean |
hasHints()
Returns
true if there are hints. |
void |
incrementHintsCount()
Increments hints count.
|
protected DbEntityDescriptor |
lookupName(java.lang.String entityName)
Lookups for entity name and throws exception if entity name not found.
|
java.lang.Object |
lookupObject(java.lang.String ref)
Lookups for object reference and throws an exception if reference doesn't exist.
|
protected DbEntityDescriptor |
lookupTableRef(java.lang.String tableRef)
Lookups for table reference and throws an exception if table reference not found.
|
protected DbEntityDescriptor |
lookupType(java.lang.Class entity)
Lookups for entity name and throws an exception if entity type is invalid.
|
java.lang.String |
registerColumnDataForColumnCode(java.lang.String tableName,
java.lang.String column) |
void |
registerColumnDataForTableRef(java.lang.String tableRef,
java.lang.String tableName) |
void |
registerHint(java.lang.String hint)
Registers a hint.
|
void |
registerTableReference(java.lang.String tableReference,
DbEntityDescriptor ded,
java.lang.String tableAlias)
Registers table reference for provided entity.
|
protected void |
resetHard() |
protected void |
resetSoft()
Resets the builder so it can be used again.
|
void |
setObjectReference(java.lang.String name,
java.lang.Object object)
Saves object reference.
|
protected final DbEntityManager entityManager
protected final ColumnAliasType defaultColumnAliasType
protected java.util.Map<java.lang.String,java.lang.Object> objectRefs
protected java.util.Map<java.lang.String,jodd.db.oom.sqlgen.TemplateData.TableRefData> tableRefs
protected java.util.Map<java.lang.String,ColumnData> columnData
protected int columnCount
protected ColumnAliasType columnAliasType
null
when column aliases are not used.protected java.util.Map<java.lang.String,ParameterValue> parameters
protected int paramCount
protected int hintCount
protected java.util.List<java.lang.String> hints
public DbEntityColumnDescriptor lastColumnDec
protected TemplateData(DbOom dbOom)
protected void resetSoft()
protected void resetHard()
public void setObjectReference(java.lang.String name, java.lang.Object object)
public java.lang.Object getObjectReference(java.lang.String name)
public java.lang.Object lookupObject(java.lang.String ref)
public DbEntityDescriptor getTableDescriptor(java.lang.String tableRef)
public DbEntityDescriptor findTableDescriptorByColumnRef(java.lang.String columnRef)
public java.lang.String getTableAlias(java.lang.String tableRef)
public void registerTableReference(java.lang.String tableReference, DbEntityDescriptor ded, java.lang.String tableAlias)
public ColumnAliasType getColumnAliasType()
public void registerColumnDataForTableRef(java.lang.String tableRef, java.lang.String tableName)
public java.lang.String registerColumnDataForColumnCode(java.lang.String tableName, java.lang.String column)
public java.lang.String getNextParameterName()
public void addParameter(java.lang.String name, java.lang.Object value, DbEntityColumnDescriptor dec)
protected DbEntityDescriptor lookupName(java.lang.String entityName)
protected DbEntityDescriptor lookupType(java.lang.Class entity)
protected DbEntityDescriptor lookupTableRef(java.lang.String tableRef)
protected void defineParameter(java.lang.StringBuilder query, java.lang.String name, java.lang.Object value)
public void registerHint(java.lang.String hint)
public void incrementHintsCount()
public boolean hasHints()
true
if there are hints.Copyright © 2003-present Jodd Team