public class MolgenisEntityJpaMapper extends AbstractJpaMapper<MolgenisEntity>
BATCH_SIZE| Constructor and Description |
|---|
MolgenisEntityJpaMapper(Database db) |
| Modifier and Type | Method and Description |
|---|---|
MolgenisEntity |
create() |
void |
create(MolgenisEntity 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<MolgenisEntity> |
createList(int size)
Return EMPTY list of given allocated size
|
void |
destroy(MolgenisEntity molgenisEntity) |
void |
edit(MolgenisEntity molgenisEntity) |
int |
executeAdd(List<? extends MolgenisEntity> entities) |
int |
executeRemove(List<? extends MolgenisEntity> entities) |
int |
executeUpdate(List<? extends MolgenisEntity> entities) |
FieldType |
getFieldType(String fieldName) |
String |
getTableFieldName(String fieldName) |
void |
prepareFileAttachements(List<MolgenisEntity> entities,
File baseDir) |
void |
resolveForeignKeys(List<MolgenisEntity> entities) |
boolean |
saveFileAttachements(List<MolgenisEntity> entities,
File baseDir) |
count, find, findById, getEntityClass, getEntityManager, removeMrefs, storeMrefsadd, add, getDatabase, remove, remove, update, updatepublic MolgenisEntityJpaMapper(Database db)
public String createFindSqlInclRules(QueryRule[] rules) throws DatabaseException
createFindSqlInclRules in interface Mapper<MolgenisEntity>createFindSqlInclRules in class AbstractJpaMapper<MolgenisEntity>DatabaseExceptionpublic void create(MolgenisEntity entity) throws DatabaseException
DatabaseExceptionpublic void destroy(MolgenisEntity molgenisEntity) throws DatabaseException
DatabaseExceptionpublic void edit(MolgenisEntity molgenisEntity) throws DatabaseException
DatabaseExceptionpublic int executeAdd(List<? extends MolgenisEntity> entities) throws DatabaseException
executeAdd in interface Mapper<MolgenisEntity>executeAdd in class AbstractMapper<MolgenisEntity>DatabaseExceptionpublic int executeUpdate(List<? extends MolgenisEntity> entities) throws DatabaseException
executeUpdate in interface Mapper<MolgenisEntity>executeUpdate in class AbstractMapper<MolgenisEntity>DatabaseExceptionpublic int executeRemove(List<? extends MolgenisEntity> entities) throws DatabaseException
executeRemove in interface Mapper<MolgenisEntity>executeRemove in class AbstractMapper<MolgenisEntity>DatabaseExceptionpublic String getTableFieldName(String fieldName)
getTableFieldName in interface Mapper<MolgenisEntity>getTableFieldName in class AbstractJpaMapper<MolgenisEntity>public List<MolgenisEntity> createList(int size)
createList in interface Mapper<MolgenisEntity>createList in class AbstractMapper<MolgenisEntity>i - initial capacity of returned EMPTY listpublic MolgenisEntity create()
create in interface Mapper<MolgenisEntity>create in class AbstractJpaMapper<MolgenisEntity>public void resolveForeignKeys(List<MolgenisEntity> entities) throws DatabaseException, ParseException
resolveForeignKeys in interface Mapper<MolgenisEntity>resolveForeignKeys in class AbstractJpaMapper<MolgenisEntity>DatabaseExceptionParseExceptionpublic FieldType getFieldType(String fieldName)
getFieldType in interface Mapper<MolgenisEntity>getFieldType in class AbstractJpaMapper<MolgenisEntity>public void prepareFileAttachements(List<MolgenisEntity> entities, File baseDir) throws IOException
prepareFileAttachements in class AbstractMapper<MolgenisEntity>IOExceptionpublic boolean saveFileAttachements(List<MolgenisEntity> entities, File baseDir) throws IOException
saveFileAttachements in class AbstractMapper<MolgenisEntity>IOExceptionCopyright © 2013. All Rights Reserved.