org.molgenis.omx.observ.value.db
Class DecimalValueJpaMapper

java.lang.Object
  extended by org.molgenis.framework.db.AbstractMapper<E>
      extended by org.molgenis.framework.db.jpa.AbstractJpaMapper<DecimalValue>
          extended by org.molgenis.omx.observ.value.db.DecimalValueJpaMapper
All Implemented Interfaces:
Mapper<DecimalValue>

public class DecimalValueJpaMapper
extends AbstractJpaMapper<DecimalValue>


Field Summary
 
Fields inherited from class org.molgenis.framework.db.AbstractMapper
BATCH_SIZE
 
Constructor Summary
DecimalValueJpaMapper(Database db)
           
 
Method Summary
 DecimalValue create()
           
 void create(DecimalValue 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<DecimalValue> createList(int size)
          Return EMPTY list of given allocated size
 void destroy(DecimalValue decimalValue)
           
 void edit(DecimalValue decimalValue)
           
 int executeAdd(List<? extends DecimalValue> entities)
           
 int executeRemove(List<? extends DecimalValue> entities)
           
 int executeUpdate(List<? extends DecimalValue> entities)
           
 FieldType getFieldType(String fieldName)
           
 String getTableFieldName(String fieldName)
           
 void prepareFileAttachements(List<DecimalValue> entities, File baseDir)
           
 void resolveForeignKeys(List<DecimalValue> entities)
           
 boolean saveFileAttachements(List<DecimalValue> entities, File baseDir)
           
 
Methods inherited from class org.molgenis.framework.db.jpa.AbstractJpaMapper
count, find, find, findById, getEntityClass, getEntityManager, removeMrefs, storeMrefs
 
Methods inherited from class org.molgenis.framework.db.AbstractMapper
add, add, add, find, getDatabase, remove, remove, remove, toList, update, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecimalValueJpaMapper

public DecimalValueJpaMapper(Database db)
Method Detail

createFindSqlInclRules

public String createFindSqlInclRules(QueryRule[] rules)
                              throws DatabaseException
Specified by:
createFindSqlInclRules in interface Mapper<DecimalValue>
Specified by:
createFindSqlInclRules in class AbstractJpaMapper<DecimalValue>
Throws:
DatabaseException

create

public void create(DecimalValue entity)
            throws DatabaseException
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

Throws:
DatabaseException

destroy

public void destroy(DecimalValue decimalValue)
             throws DatabaseException
Throws:
DatabaseException

edit

public void edit(DecimalValue decimalValue)
          throws DatabaseException
Throws:
DatabaseException

executeAdd

public int executeAdd(List<? extends DecimalValue> entities)
               throws DatabaseException
Specified by:
executeAdd in interface Mapper<DecimalValue>
Specified by:
executeAdd in class AbstractMapper<DecimalValue>
Throws:
DatabaseException

executeUpdate

public int executeUpdate(List<? extends DecimalValue> entities)
                  throws DatabaseException
Specified by:
executeUpdate in interface Mapper<DecimalValue>
Specified by:
executeUpdate in class AbstractMapper<DecimalValue>
Throws:
DatabaseException

executeRemove

public int executeRemove(List<? extends DecimalValue> entities)
                  throws DatabaseException
Specified by:
executeRemove in interface Mapper<DecimalValue>
Specified by:
executeRemove in class AbstractMapper<DecimalValue>
Throws:
DatabaseException

getTableFieldName

public String getTableFieldName(String fieldName)
Specified by:
getTableFieldName in interface Mapper<DecimalValue>
Specified by:
getTableFieldName in class AbstractJpaMapper<DecimalValue>

createList

public List<DecimalValue> createList(int size)
Return EMPTY list of given allocated size

Specified by:
createList in interface Mapper<DecimalValue>
Specified by:
createList in class AbstractMapper<DecimalValue>
Parameters:
i - initial capacity of returned EMPTY list
Returns:
an EMPTY list with initial capacity given by size

create

public DecimalValue create()
Specified by:
create in interface Mapper<DecimalValue>
Specified by:
create in class AbstractJpaMapper<DecimalValue>

resolveForeignKeys

public void resolveForeignKeys(List<DecimalValue> entities)
                        throws DatabaseException,
                               ParseException
Specified by:
resolveForeignKeys in interface Mapper<DecimalValue>
Specified by:
resolveForeignKeys in class AbstractJpaMapper<DecimalValue>
Throws:
DatabaseException
ParseException

getFieldType

public FieldType getFieldType(String fieldName)
Specified by:
getFieldType in interface Mapper<DecimalValue>
Specified by:
getFieldType in class AbstractJpaMapper<DecimalValue>

prepareFileAttachements

public void prepareFileAttachements(List<DecimalValue> entities,
                                    File baseDir)
                             throws IOException
Specified by:
prepareFileAttachements in class AbstractMapper<DecimalValue>
Throws:
IOException

saveFileAttachements

public boolean saveFileAttachements(List<DecimalValue> entities,
                                    File baseDir)
                             throws IOException
Specified by:
saveFileAttachements in class AbstractMapper<DecimalValue>
Throws:
IOException


Copyright © 2013. All Rights Reserved.