Class ImportedIdSimple
- java.lang.Object
-
- io.ebeaninternal.server.deploy.id.ImportedIdSimple
-
- All Implemented Interfaces:
ImportedId
,Comparable<ImportedIdSimple>
public final class ImportedIdSimple extends Object implements ImportedId, Comparable<ImportedIdSimple>
Single scalar imported id.
-
-
Constructor Summary
Constructors Constructor Description ImportedIdSimple(BeanPropertyAssoc<?> owner, String localDbColumn, String localSqlFormula, BeanProperty foreignProperty, int position)
ImportedIdSimple(BeanPropertyAssoc<?> owner, String localDbColumn, String localSqlFormula, BeanProperty foreignProperty, int position, boolean insertable, boolean updateable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFkeys(String name)
int
bind(int position, SqlUpdate update, EntityBean bean)
Bind the imported Id value to the SqlUpdate.Object
bind(BindableRequest request, EntityBean bean)
Bind the value from the bean.void
bindImport(SqlUpdate sql, EntityBean other)
Bind values to the intersection SqlUpdate.void
buildImport(IntersectionBuilder row)
Add DB columns to the intersection builder.void
buildImport(IntersectionRow row, EntityBean other)
For inserting into ManyToMany intersection.int
compareTo(ImportedIdSimple other)
void
dmlAppend(GenerateDmlRequest request)
Append to the DML statement.boolean
equals(Object obj)
BeanProperty
findMatchImport(String matchDbColumn)
Used to derive a missing concatenated key from multiple imported keys.String
getDbColumn()
For scalar id return the related single db column.String
importedIdClause()
Return the set importedId clause.boolean
isScalar()
Return true if this id is a simple single scalar value.static ImportedIdSimple[]
sort(List<ImportedIdSimple> list)
Return the list as an array sorted into the same order as the Bean Properties.void
sqlAppend(DbSqlContext ctx)
Append the the SQL query statement.
-
-
-
Constructor Detail
-
ImportedIdSimple
public ImportedIdSimple(BeanPropertyAssoc<?> owner, String localDbColumn, String localSqlFormula, BeanProperty foreignProperty, int position, boolean insertable, boolean updateable)
-
ImportedIdSimple
public ImportedIdSimple(BeanPropertyAssoc<?> owner, String localDbColumn, String localSqlFormula, BeanProperty foreignProperty, int position)
-
-
Method Detail
-
sort
public static ImportedIdSimple[] sort(List<ImportedIdSimple> list)
Return the list as an array sorted into the same order as the Bean Properties.
-
compareTo
public int compareTo(ImportedIdSimple other)
- Specified by:
compareTo
in interfaceComparable<ImportedIdSimple>
-
addFkeys
public void addFkeys(String name)
- Specified by:
addFkeys
in interfaceImportedId
-
isScalar
public boolean isScalar()
Description copied from interface:ImportedId
Return true if this id is a simple single scalar value. False if it is a compound id (embedded or multiple).- Specified by:
isScalar
in interfaceImportedId
-
getDbColumn
public String getDbColumn()
Description copied from interface:ImportedId
For scalar id return the related single db column.This is essentially the imported foreign key column (where there is only one).
- Specified by:
getDbColumn
in interfaceImportedId
-
buildImport
public void buildImport(IntersectionBuilder row)
Description copied from interface:ImportedId
Add DB columns to the intersection builder.- Specified by:
buildImport
in interfaceImportedId
-
bindImport
public void bindImport(SqlUpdate sql, EntityBean other)
Description copied from interface:ImportedId
Bind values to the intersection SqlUpdate.- Specified by:
bindImport
in interfaceImportedId
-
buildImport
public void buildImport(IntersectionRow row, EntityBean other)
Description copied from interface:ImportedId
For inserting into ManyToMany intersection.- Specified by:
buildImport
in interfaceImportedId
-
sqlAppend
public void sqlAppend(DbSqlContext ctx)
Description copied from interface:ImportedId
Append the the SQL query statement.- Specified by:
sqlAppend
in interfaceImportedId
-
dmlAppend
public void dmlAppend(GenerateDmlRequest request)
Description copied from interface:ImportedId
Append to the DML statement.- Specified by:
dmlAppend
in interfaceImportedId
-
importedIdClause
public String importedIdClause()
Description copied from interface:ImportedId
Return the set importedId clause.- Specified by:
importedIdClause
in interfaceImportedId
-
bind
public int bind(int position, SqlUpdate update, EntityBean bean)
Description copied from interface:ImportedId
Bind the imported Id value to the SqlUpdate.- Specified by:
bind
in interfaceImportedId
-
bind
public Object bind(BindableRequest request, EntityBean bean) throws SQLException
Description copied from interface:ImportedId
Bind the value from the bean.- Specified by:
bind
in interfaceImportedId
- Throws:
SQLException
-
findMatchImport
public BeanProperty findMatchImport(String matchDbColumn)
Description copied from interface:ImportedId
Used to derive a missing concatenated key from multiple imported keys.- Specified by:
findMatchImport
in interfaceImportedId
-
-