public abstract class ManagedDataTransferDaoBase extends HibernateDaoSupport implements ManagedDataTransferDao
Base Spring DAO Class: is able to create, update, remove, load, and find
objects of type ManagedDataTransfer
.
ManagedDataTransfer
TRANSFORM_NONE
Constructor and Description |
---|
ManagedDataTransferDaoBase() |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateFirstResult(int pageNumber,
int pageSize)
firstResult = (pageNumber - 1) * pageSize
|
Collection<ManagedDataTransfer> |
create(Collection<ManagedDataTransfer> entities)
Creates a new instance of ManagedDataTransfer and adds
from the passed in
entities collection |
ManagedDataTransfer |
create(Date transferDate)
Creates a new
ManagedDataTransfer
instance from all attributes and adds it to
the persistent store. |
Collection<?> |
create(int transform,
Collection<ManagedDataTransfer> entities)
Does the same thing as
ManagedDataTransferDao.create(ManagedDataTransfer) with an
additional flag called transform . |
Object |
create(int transform,
Date transferDate)
Does the same thing as
ManagedDataTransferDao.create(Date) with an
additional flag called transform . |
Object |
create(int transform,
ManagedData managedData,
Person newManagerUser,
Date transferDate)
Does the same thing as
ManagedDataTransferDao.create(Date) with an
additional flag called transform . |
Object |
create(int transform,
ManagedDataTransfer managedDataTransfer)
Does the same thing as
ManagedDataTransferDao.create(ManagedDataTransfer) with an
additional flag called transform . |
ManagedDataTransfer |
create(ManagedData managedData,
Person newManagerUser,
Date transferDate)
Creates a new
ManagedDataTransfer
instance from only required properties (attributes
and association ends) and adds it to the persistent store. |
ManagedDataTransfer |
create(ManagedDataTransfer managedDataTransfer)
Creates an instance of ManagedDataTransfer and adds it to the persistent store.
|
Object |
get(int transform,
ManagedDataTransferPK managedDataTransferPk)
Does the same thing as
ManagedDataTransferDao.get(ManagedDataTransferPK) with an
additional flag called transform . |
ManagedDataTransfer |
get(ManagedDataTransferPK managedDataTransferPk)
Gets an instance of ManagedDataTransfer from the persistent store.
|
protected PaginationResult |
getPaginationResult(Query queryObject,
int transform,
int pageNumber,
int pageSize)
Executes and returns the given Hibernate queryObject as a
PaginationResult instance. |
protected Principal |
getPrincipal()
Gets the current
principal if one has been set,
otherwise returns null . |
Object |
load(int transform,
ManagedDataTransferPK managedDataTransferPk)
Does the same thing as
ManagedDataTransferDao.load(ManagedDataTransferPK) with an
additional flag called transform . |
ManagedDataTransfer |
load(ManagedDataTransferPK managedDataTransferPk)
Loads an instance of ManagedDataTransfer from the persistent store.
|
Collection<ManagedDataTransfer> |
loadAll()
Loads all entities of type
ManagedDataTransfer . |
Collection<?> |
loadAll(int transform)
Does the same thing as
ManagedDataTransferDao.loadAll() with an
additional flag called transform . |
Collection<?> |
loadAll(int pageNumber,
int pageSize)
Does the same thing as
ManagedDataTransferDao.loadAll() with an
additional two arguments called pageNumber and pageSize . |
Collection<?> |
loadAll(int transform,
int pageNumber,
int pageSize)
Does the same thing as
ManagedDataTransferDao.loadAll(int) with an
additional two arguments called pageNumber and pageSize . |
void |
remove(Collection<ManagedDataTransfer> entities)
Removes all entities in the given
entities collection. |
void |
remove(ManagedDataTransfer managedDataTransfer)
Removes the instance of ManagedDataTransfer from the persistent store.
|
void |
remove(ManagedDataTransferPK managedDataTransferPk)
Removes the instance of ManagedDataTransfer having the given
identifier from the persistent store. |
PaginationResult |
search(int transform,
int pageNumber,
int pageSize,
Search search)
Does the same thing as
ManagedDataTransferDao.search(int, Search) but with an
additional two flags called pageNumber and pageSize . |
PaginationResult |
search(int pageNumber,
int pageSize,
Search search)
Does the same thing as
ManagedDataTransferDao.search(Search) but with an
additional two flags called pageNumber and pageSize . |
Set<?> |
search(int transform,
Search search)
Does the same thing as
ManagedDataTransferDao.search(Search) but with an
additional flag called transform . |
Set<ManagedDataTransfer> |
search(Search search)
Performs a search using the parameters specified in the given
search object. |
void |
toEntities(Collection<?> results)
Transforms the given results to a collection of
ManagedDataTransfer
instances (this is useful when the returned results contains a row of data and you want just entities only). |
protected ManagedDataTransfer |
toEntity(Object[] row) |
void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
ManagedDataTransferDao.transformEntity(int,ManagedDataTransfer)
method. |
Object |
transformEntity(int transform,
ManagedDataTransfer entity)
Allows transformation of entities into value objects
(or something else for that matter), when the
transform
flag is set to one of the constants defined in ManagedDataTransferDao , please note
that the ManagedDataTransferDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself
will be returned. |
void |
update(Collection<ManagedDataTransfer> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(ManagedDataTransfer managedDataTransfer)
Updates the
managedDataTransfer instance in the persistent store. |
convertDatabase2UI, convertUI2DatabaseMandatoryDate, createQuery, dateOfYearWithOneMiliSecond, dateOfYearWithOneMiliSecondInMili, dateWithNoMiliSecond, dateWithNoSecondAndMiliSecond, dateWithNoSecondAndOneMiliSecond, dateWithNoTime, dateWithOneMiliSecond, deleteAll, get, getSession, getSession, getSessionFactory, load, newCreateDate, queryIterator, queryIteratorTyped, queryIteratorWithPage, queryList, queryListTyped, queryUnique, queryUniqueTyped, queryUpdate, setQueryParams, setSessionFactory
public ManagedDataTransferDaoBase()
public Object get(int transform, ManagedDataTransferPK managedDataTransferPk)
Does the same thing as ManagedDataTransferDao.get(ManagedDataTransferPK)
with an
additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
the returned entity will NOT be transformed. If this flag is any of the other constants
defined in this class then the result WILL BE passed through an operation which can
optionally transform the entity (into a value object for example). By default, transformation does
not occur.
get
in interface ManagedDataTransferDao
transform
- flag to determine transformation type.managedDataTransferPk
- the identifier of the entity to get.public ManagedDataTransfer get(ManagedDataTransferPK managedDataTransferPk)
get
in interface ManagedDataTransferDao
public Object load(int transform, ManagedDataTransferPK managedDataTransferPk)
Does the same thing as ManagedDataTransferDao.load(ManagedDataTransferPK)
with an
additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
the returned entity will NOT be transformed. If this flag is any of the other constants
defined in this class then the result WILL BE passed through an operation which can
optionally transform the entity (into a value object for example). By default, transformation does
not occur.
load
in interface ManagedDataTransferDao
transform
- flag to determine transformation type.managedDataTransferPk
- the identifier of the entity to load.public ManagedDataTransfer load(ManagedDataTransferPK managedDataTransferPk)
load
in interface ManagedDataTransferDao
public Collection<ManagedDataTransfer> loadAll()
ManagedDataTransfer
.loadAll
in interface ManagedDataTransferDao
public Collection<?> loadAll(int transform)
Does the same thing as ManagedDataTransferDao.loadAll()
with an
additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
the returned entity will NOT be transformed. If this flag is any of the other constants
defined here then the result WILL BE passed through an operation which can optionally
transform the entity (into a value object for example). By default, transformation does
not occur.
loadAll
in interface ManagedDataTransferDao
transform
- the flag indicating what transformation to use.public Collection<?> loadAll(int pageNumber, int pageSize)
Does the same thing as ManagedDataTransferDao.loadAll()
with an
additional two arguments called pageNumber
and pageSize
. The pageNumber
argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the
page retrieved.
loadAll
in interface ManagedDataTransferDao
pageNumber
- the page number to retrieve when paging results.pageSize
- the size of the page to retrieve when paging results.public Collection<?> loadAll(int transform, int pageNumber, int pageSize)
Does the same thing as ManagedDataTransferDao.loadAll(int)
with an
additional two arguments called pageNumber
and pageSize
. The pageNumber
argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the
page retrieved.
loadAll
in interface ManagedDataTransferDao
transform
- the flag indicating what transformation to use.pageNumber
- the page number to retrieve when paging results.pageSize
- the size of the page to retrieve when paging results.protected int calculateFirstResult(int pageNumber, int pageSize)
pageNumber
- pageSize
- public ManagedDataTransfer create(ManagedDataTransfer managedDataTransfer)
create
in interface ManagedDataTransferDao
public Object create(int transform, ManagedDataTransfer managedDataTransfer)
Does the same thing as ManagedDataTransferDao.create(ManagedDataTransfer)
with an
additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
the returned entity will NOT be transformed. If this flag is any of the other constants
defined here then the result WILL BE passed through an operation which can optionally
transform the entity (into a value object for example). By default, transformation does
not occur.
create
in interface ManagedDataTransferDao
public Collection<ManagedDataTransfer> create(Collection<ManagedDataTransfer> entities)
entities
collectioncreate
in interface ManagedDataTransferDao
entities
- the collection of ManagedDataTransfer
instances to create.public Collection<?> create(int transform, Collection<ManagedDataTransfer> entities)
Does the same thing as ManagedDataTransferDao.create(ManagedDataTransfer)
with an
additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
the returned entity will NOT be transformed. If this flag is any of the other constants
defined here then the result WILL BE passed through an operation which can optionally
transform the entities (into value objects for example). By default, transformation does
not occur.
create
in interface ManagedDataTransferDao
public ManagedDataTransfer create(Date transferDate)
Creates a new ManagedDataTransfer
instance from all attributes and adds it to
the persistent store.
create
in interface ManagedDataTransferDao
transferDate
- Date à partir de laquelle le transfert s'applique.
Cette date doit etre comparée à la date de la saisie, et non à la date de la donnée et elle meme.
Exemple :
- Si transfert d'un portefeuille à compté du 1 mars de l'année N.
- dès le 1er mars, le nouveau propriétaire de la donnée pourra saisir sur le protefeuille, par
exemple des enquete sur l'année N-1.public Object create(int transform, Date transferDate)
Does the same thing as ManagedDataTransferDao.create(Date)
with an
additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
the returned entity will NOT be transformed. If this flag is any of the other constants
defined here then the result WILL BE passed through an operation which can optionally
transform the entity (into a value object for example). By default, transformation does
not occur.
create
in interface ManagedDataTransferDao
transferDate
- Date à partir de laquelle le transfert s'applique.
Cette date doit etre comparée à la date de la saisie, et non à la date de la donnée et elle meme.
Exemple :
- Si transfert d'un portefeuille à compté du 1 mars de l'année N.
- dès le 1er mars, le nouveau propriétaire de la donnée pourra saisir sur le protefeuille, par
exemple des enquete sur l'année N-1.public ManagedDataTransfer create(ManagedData managedData, Person newManagerUser, Date transferDate)
Creates a new ManagedDataTransfer
instance from only required properties (attributes
and association ends) and adds it to the persistent store.
create
in interface ManagedDataTransferDao
public Object create(int transform, ManagedData managedData, Person newManagerUser, Date transferDate)
Does the same thing as ManagedDataTransferDao.create(Date)
with an
additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
the returned entity will NOT be transformed. If this flag is any of the other constants
defined here then the result WILL BE passed through an operation which can optionally
transform the entity (into a value object for example). By default, transformation does
not occur.
create
in interface ManagedDataTransferDao
transform
- flag to determine transformation type.public void update(ManagedDataTransfer managedDataTransfer)
managedDataTransfer
instance in the persistent store.update
in interface ManagedDataTransferDao
public void update(Collection<ManagedDataTransfer> entities)
entities
collection in the persistent store.update
in interface ManagedDataTransferDao
public void remove(ManagedDataTransfer managedDataTransfer)
remove
in interface ManagedDataTransferDao
public void remove(ManagedDataTransferPK managedDataTransferPk)
identifier
from the persistent store.remove
in interface ManagedDataTransferDao
public void remove(Collection<ManagedDataTransfer> entities)
entities
collection.remove
in interface ManagedDataTransferDao
public Object transformEntity(int transform, ManagedDataTransfer entity)
transform
flag is set to one of the constants defined in ManagedDataTransferDao
, please note
that the ManagedDataTransferDao.TRANSFORM_NONE
constant denotes no transformation, so the entity itself
will be returned.
If the integer argument value is unknown ManagedDataTransferDao.TRANSFORM_NONE
is assumed.transformEntity
in interface ManagedDataTransferDao
transform
- one of the constants declared in ManagedDataTransferDao
entity
- an entity that was foundManagedDataTransferDao.transformEntity(int, ManagedDataTransfer)
public void transformEntities(int transform, Collection<?> entities)
ManagedDataTransferDao.transformEntity(int,ManagedDataTransfer)
method. This method does not instantiate a new collection.
This method is to be used internally only.
transformEntities
in interface ManagedDataTransferDao
transform
- one of the constants declared in fr.ifremer.adagio.core.dao.administration.user.ManagedDataTransferDao
entities
- the collection of entities to transformManagedDataTransferDao.transformEntity(int,ManagedDataTransfer)
public void toEntities(Collection<?> results)
ManagedDataTransferDao
ManagedDataTransfer
instances (this is useful when the returned results contains a row of data and you want just entities only).toEntities
in interface ManagedDataTransferDao
results
- the query results.ManagedDataTransferDao.toEntities(Collection)
protected ManagedDataTransfer toEntity(Object[] row)
row
- protected Principal getPrincipal()
principal
if one has been set,
otherwise returns null
.public PaginationResult search(int transform, int pageNumber, int pageSize, Search search)
ManagedDataTransferDao.search(int, Search)
but with an
additional two flags called pageNumber
and pageSize
. These flags allow you to
limit your data to a specified page number and size.search
in interface ManagedDataTransferDao
transform
- the transformation flag.pageNumber
- the page number in the data to retrievepageSize
- the size of the page to retrieve.search
- the search object which provides the search parameters and pagination specification.PaginationResult
instance.public PaginationResult search(int pageNumber, int pageSize, Search search)
ManagedDataTransferDao.search(Search)
but with an
additional two flags called pageNumber
and pageSize
. These flags allow you to
limit your data to a specified page number and size.search
in interface ManagedDataTransferDao
pageNumber
- the page number in the data to retrievepageSize
- the size of the page to retrieve.search
- the search object which provides the search parameters and pagination specification.PaginationResult
instance.public Set<?> search(int transform, Search search)
ManagedDataTransferDao.search(Search)
but with an
additional flag called transform
. If this flag is set to TRANSFORM_NONE
then
finder results will NOT be transformed during retrieval.
If this flag is any of the other constants defined here
then results WILL BE passed through an operation which can optionally
transform the entities (into value objects for example). By default, transformation does
not occur.search
in interface ManagedDataTransferDao
transform
- the transformation flag.search
- the search object which provides the search parameters and pagination specification.public Set<ManagedDataTransfer> search(Search search)
search
object.search
in interface ManagedDataTransferDao
search
- the search object which provides the search parameters and pagination specification.protected PaginationResult getPaginationResult(Query queryObject, int transform, int pageNumber, int pageSize)
PaginationResult
instance.queryObject
- transform
- pageNumber
- pageSize
- Copyright © 2012–2014 IFREMER. All rights reserved.