public class MappedEntity
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
MappedEntity()
Creates a new instance of
MappedEntity. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.lang.String |
getAutoIncColumn()
Gets the auto increment column.
|
DbEntity |
getEntity()
Gets the entity.
|
java.sql.PreparedStatement |
getInsert()
Gets the prepared statement for inserts.
|
java.sql.PreparedStatement |
getInsertReturning()
Gets the prepared statement for inserts that retrieve the generated keys using the
insert statement.
|
java.sql.PreparedStatement |
getInsertWithAutoInc()
Gets the insert statement with auto increment columns.
|
boolean |
isSequenceDirty()
Checks if a sequence is dirty.
|
MappedEntity |
setAutoIncColumn(java.lang.String autoIncColumn)
Sets the auto increment column.
|
MappedEntity |
setEntity(DbEntity entity)
Sets the entity.
|
MappedEntity |
setInsert(java.sql.PreparedStatement insert)
Sets the insert statement.
|
MappedEntity |
setInsertReturning(java.sql.PreparedStatement insertReturning)
Sets the insert statement that allows returning the generated keys.
|
MappedEntity |
setInsertWithAutoInc(java.sql.PreparedStatement insertWithAutoInc)
Sets the insert statement auto inc columns.
|
void |
setSequenceDirty(boolean sequenceDirty)
Sets a sequence as dirty or not.
|
public MappedEntity()
MappedEntity.public MappedEntity setEntity(DbEntity entity)
entity - The entity.public MappedEntity setInsert(java.sql.PreparedStatement insert)
insert - The insert statement.public DbEntity getEntity()
public java.sql.PreparedStatement getInsert()
public java.sql.PreparedStatement getInsertReturning()
public MappedEntity setInsertReturning(java.sql.PreparedStatement insertReturning)
insertReturning - The insert statement that allows returning the generated keyspublic java.sql.PreparedStatement getInsertWithAutoInc()
DatabaseEngine.persist(String, EntityEntry, boolean)public MappedEntity setInsertWithAutoInc(java.sql.PreparedStatement insertWithAutoInc)
insertWithAutoInc - The insert statement with auto inc columns.DatabaseEngine.persist(String, EntityEntry, boolean)public java.lang.String getAutoIncColumn()
public MappedEntity setAutoIncColumn(java.lang.String autoIncColumn)
autoIncColumn - the auto increment column.public boolean isSequenceDirty()
true if the sequence is dirty, false otherwise.public void setSequenceDirty(boolean sequenceDirty)
sequenceDirty - The flag signaling the status of the sequence.public void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.ExceptionCopyright © 2020 Feedzai. All Rights Reserved.