public class SampleJpaMapper extends AbstractJpaMapper<Sample>
BATCH_SIZE| Constructor and Description |
|---|
SampleJpaMapper(Database db) |
| Modifier and Type | Method and Description |
|---|---|
Sample |
create() |
void |
create(Sample entity)
This method first saves the objects that are being refered to by entity,
then the entity itself and
finally the objects that refer to this object
|
String |
createFindSqlInclRules(QueryRule[] rules) |
List<Sample> |
createList(int size)
Return EMPTY list of given allocated size
|
void |
destroy(Sample sample) |
void |
edit(Sample sample) |
int |
executeAdd(List<? extends Sample> entities) |
int |
executeRemove(List<? extends Sample> entities) |
int |
executeUpdate(List<? extends Sample> entities) |
FieldType |
getFieldType(String fieldName) |
String |
getTableFieldName(String fieldName) |
void |
prepareFileAttachements(List<Sample> entities,
File baseDir) |
void |
resolveForeignKeys(List<Sample> entities) |
boolean |
saveFileAttachements(List<Sample> entities,
File baseDir) |
count, find, findById, getEntityClass, getEntityManager, removeMrefs, storeMrefsadd, add, getDatabase, remove, remove, update, updatepublic SampleJpaMapper(Database db)
public String createFindSqlInclRules(QueryRule[] rules) throws DatabaseException
createFindSqlInclRules in interface Mapper<Sample>createFindSqlInclRules in class AbstractJpaMapper<Sample>DatabaseExceptionpublic void create(Sample entity) throws DatabaseException
DatabaseExceptionpublic void destroy(Sample sample) throws DatabaseException
DatabaseExceptionpublic void edit(Sample sample) throws DatabaseException
DatabaseExceptionpublic int executeAdd(List<? extends Sample> entities) throws DatabaseException
executeAdd in interface Mapper<Sample>executeAdd in class AbstractMapper<Sample>DatabaseExceptionpublic int executeUpdate(List<? extends Sample> entities) throws DatabaseException
executeUpdate in interface Mapper<Sample>executeUpdate in class AbstractMapper<Sample>DatabaseExceptionpublic int executeRemove(List<? extends Sample> entities) throws DatabaseException
executeRemove in interface Mapper<Sample>executeRemove in class AbstractMapper<Sample>DatabaseExceptionpublic String getTableFieldName(String fieldName)
getTableFieldName in interface Mapper<Sample>getTableFieldName in class AbstractJpaMapper<Sample>public List<Sample> createList(int size)
createList in interface Mapper<Sample>createList in class AbstractMapper<Sample>i - initial capacity of returned EMPTY listpublic Sample create()
public void resolveForeignKeys(List<Sample> entities) throws DatabaseException, ParseException
resolveForeignKeys in interface Mapper<Sample>resolveForeignKeys in class AbstractJpaMapper<Sample>DatabaseExceptionParseExceptionpublic FieldType getFieldType(String fieldName)
getFieldType in interface Mapper<Sample>getFieldType in class AbstractJpaMapper<Sample>public void prepareFileAttachements(List<Sample> entities, File baseDir) throws IOException
prepareFileAttachements in class AbstractMapper<Sample>IOExceptionpublic boolean saveFileAttachements(List<Sample> entities, File baseDir) throws IOException
saveFileAttachements in class AbstractMapper<Sample>IOExceptionCopyright © 2013. All Rights Reserved.