public abstract class LocationAssociationDaoBase extends HibernateDaoSupport implements LocationAssociationDao
Base Spring DAO Class: is able to create, update, remove, load, and find
objects of type LocationAssociation
.
LocationAssociation
debugEntityLoad, logger
TRANSFORM_NONE
Constructor and Description |
---|
LocationAssociationDaoBase() |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateFirstResult(int pageNumber,
int pageSize)
firstResult = (pageNumber - 1) * pageSize
|
Collection<LocationAssociation> |
create(Collection<LocationAssociation> entities)
Creates a new instance of LocationAssociation and adds
from the passed in
entities collection |
LocationAssociation |
create(Float childSurfaceRatio,
Timestamp updateDate)
Creates a new
LocationAssociation
instance from all attributes and adds it to
the persistent store. |
Collection<?> |
create(int transform,
Collection<LocationAssociation> entities)
Does the same thing as
LocationAssociationDao.create(LocationAssociation) with an
additional flag called transform . |
Object |
create(int transform,
Float childSurfaceRatio,
Timestamp updateDate)
Does the same thing as
LocationAssociationDao.create(Float, Timestamp) with an
additional flag called transform . |
Object |
create(int transform,
LocationAssociation locationAssociation)
Does the same thing as
LocationAssociationDao.create(LocationAssociation) with an
additional flag called transform . |
Object |
create(int transform,
Location childLocation,
Float childSurfaceRatio,
Location parentLocation,
Timestamp updateDate)
Does the same thing as
LocationAssociationDao.create(Float, Timestamp) with an
additional flag called transform . |
LocationAssociation |
create(LocationAssociation locationAssociation)
Creates an instance of LocationAssociation and adds it to the persistent store.
|
LocationAssociation |
create(Location childLocation,
Float childSurfaceRatio,
Location parentLocation,
Timestamp updateDate)
Creates a new
LocationAssociation
instance from only required properties (attributes
and association ends) and adds it to the persistent store. |
Object |
get(int transform,
LocationAssociationPK locationAssociationPk)
Does the same thing as
LocationAssociationDao.get(LocationAssociationPK) with an
additional flag called transform . |
LocationAssociation |
get(LocationAssociationPK locationAssociationPk)
Gets an instance of LocationAssociation 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,
LocationAssociationPK locationAssociationPk)
Does the same thing as
LocationAssociationDao.load(LocationAssociationPK) with an
additional flag called transform . |
LocationAssociation |
load(LocationAssociationPK locationAssociationPk)
Loads an instance of LocationAssociation from the persistent store.
|
Collection<LocationAssociation> |
loadAll()
Loads all entities of type
LocationAssociation . |
Collection<?> |
loadAll(int transform)
Does the same thing as
LocationAssociationDao.loadAll() with an
additional flag called transform . |
Collection<?> |
loadAll(int pageNumber,
int pageSize)
Does the same thing as
LocationAssociationDao.loadAll() with an
additional two arguments called pageNumber and pageSize . |
Collection<?> |
loadAll(int transform,
int pageNumber,
int pageSize)
Does the same thing as
LocationAssociationDao.loadAll(int) with an
additional two arguments called pageNumber and pageSize . |
void |
remove(Collection<LocationAssociation> entities)
Removes all entities in the given
entities collection. |
void |
remove(LocationAssociation locationAssociation)
Removes the instance of LocationAssociation from the persistent store.
|
void |
remove(LocationAssociationPK locationAssociationPk)
Removes the instance of LocationAssociation having the given
identifier from the persistent store. |
PaginationResult |
search(int transform,
int pageNumber,
int pageSize,
Search search)
Does the same thing as
LocationAssociationDao.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
LocationAssociationDao.search(Search) but with an
additional two flags called pageNumber and pageSize . |
Set<?> |
search(int transform,
Search search)
Does the same thing as
LocationAssociationDao.search(Search) but with an
additional flag called transform . |
Set<LocationAssociation> |
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
LocationAssociation
instances (this is useful when the returned results contains a row of data and you want just entities only). |
protected LocationAssociation |
toEntity(Object[] row) |
void |
transformEntities(int transform,
Collection<?> entities)
Transforms a collection of entities using the
LocationAssociationDao.transformEntity(int,LocationAssociation)
method. |
Object |
transformEntity(int transform,
LocationAssociation 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 LocationAssociationDao , please note
that the LocationAssociationDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself
will be returned. |
void |
update(Collection<LocationAssociation> entities)
Updates all instances in the
entities collection in the persistent store. |
void |
update(LocationAssociation locationAssociation)
Updates the
locationAssociation 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 LocationAssociationDaoBase()
public Object get(int transform, LocationAssociationPK locationAssociationPk)
Does the same thing as LocationAssociationDao.get(LocationAssociationPK)
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 LocationAssociationDao
transform
- flag to determine transformation type.locationAssociationPk
- the identifier of the entity to get.public LocationAssociation get(LocationAssociationPK locationAssociationPk)
get
in interface LocationAssociationDao
public Object load(int transform, LocationAssociationPK locationAssociationPk)
Does the same thing as LocationAssociationDao.load(LocationAssociationPK)
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 LocationAssociationDao
transform
- flag to determine transformation type.locationAssociationPk
- the identifier of the entity to load.public LocationAssociation load(LocationAssociationPK locationAssociationPk)
load
in interface LocationAssociationDao
public Collection<LocationAssociation> loadAll()
LocationAssociation
.loadAll
in interface LocationAssociationDao
public Collection<?> loadAll(int transform)
Does the same thing as LocationAssociationDao.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 LocationAssociationDao
transform
- the flag indicating what transformation to use.public Collection<?> loadAll(int pageNumber, int pageSize)
Does the same thing as LocationAssociationDao.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 LocationAssociationDao
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 LocationAssociationDao.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 LocationAssociationDao
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 LocationAssociation create(LocationAssociation locationAssociation)
create
in interface LocationAssociationDao
public Object create(int transform, LocationAssociation locationAssociation)
Does the same thing as LocationAssociationDao.create(LocationAssociation)
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 LocationAssociationDao
public Collection<LocationAssociation> create(Collection<LocationAssociation> entities)
entities
collectioncreate
in interface LocationAssociationDao
entities
- the collection of LocationAssociation
instances to create.public Collection<?> create(int transform, Collection<LocationAssociation> entities)
Does the same thing as LocationAssociationDao.create(LocationAssociation)
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 LocationAssociationDao
public LocationAssociation create(Float childSurfaceRatio, Timestamp updateDate)
Creates a new LocationAssociation
instance from all attributes and adds it to
the persistent store.
create
in interface LocationAssociationDao
childSurfaceRatio
- Ratio de couverture (en surface) du lieu fils par rapport au lieu père. La valeur doit etre
supérieure strictement à 0 et inférieur ou égale à 1.
Un Lieu qui a un ratio de surface de 1 n'a donc qu'un seul lieu père direct. Un lieu qui a un ratio
de surface inférieur à 1 peu avoir potentiellement plusieurs lieux pères directs.public Object create(int transform, Float childSurfaceRatio, Timestamp updateDate)
Does the same thing as LocationAssociationDao.create(Float, Timestamp)
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 LocationAssociationDao
childSurfaceRatio
- Ratio de couverture (en surface) du lieu fils par rapport au lieu père. La valeur doit etre
supérieure strictement à 0 et inférieur ou égale à 1.
Un Lieu qui a un ratio de surface de 1 n'a donc qu'un seul lieu père direct. Un lieu qui a un ratio
de surface inférieur à 1 peu avoir potentiellement plusieurs lieux pères directs.public LocationAssociation create(Location childLocation, Float childSurfaceRatio, Location parentLocation, Timestamp updateDate)
Creates a new LocationAssociation
instance from only required properties (attributes
and association ends) and adds it to the persistent store.
create
in interface LocationAssociationDao
public Object create(int transform, Location childLocation, Float childSurfaceRatio, Location parentLocation, Timestamp updateDate)
Does the same thing as LocationAssociationDao.create(Float, Timestamp)
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 LocationAssociationDao
transform
- flag to determine transformation type.public void update(LocationAssociation locationAssociation)
locationAssociation
instance in the persistent store.update
in interface LocationAssociationDao
public void update(Collection<LocationAssociation> entities)
entities
collection in the persistent store.update
in interface LocationAssociationDao
public void remove(LocationAssociation locationAssociation)
remove
in interface LocationAssociationDao
public void remove(LocationAssociationPK locationAssociationPk)
identifier
from the persistent store.remove
in interface LocationAssociationDao
public void remove(Collection<LocationAssociation> entities)
entities
collection.remove
in interface LocationAssociationDao
public Object transformEntity(int transform, LocationAssociation entity)
transform
flag is set to one of the constants defined in LocationAssociationDao
, please note
that the LocationAssociationDao.TRANSFORM_NONE
constant denotes no transformation, so the entity itself
will be returned.
If the integer argument value is unknown LocationAssociationDao.TRANSFORM_NONE
is assumed.transformEntity
in interface LocationAssociationDao
transform
- one of the constants declared in LocationAssociationDao
entity
- an entity that was foundLocationAssociationDao.transformEntity(int, LocationAssociation)
public void transformEntities(int transform, Collection<?> entities)
LocationAssociationDao.transformEntity(int,LocationAssociation)
method. This method does not instantiate a new collection.
This method is to be used internally only.
transformEntities
in interface LocationAssociationDao
transform
- one of the constants declared in fr.ifremer.adagio.core.dao.referential.location.LocationAssociationDao
entities
- the collection of entities to transformLocationAssociationDao.transformEntity(int,LocationAssociation)
public void toEntities(Collection<?> results)
LocationAssociationDao
LocationAssociation
instances (this is useful when the returned results contains a row of data and you want just entities only).toEntities
in interface LocationAssociationDao
results
- the query results.LocationAssociationDao.toEntities(Collection)
protected LocationAssociation 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)
LocationAssociationDao.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 LocationAssociationDao
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)
LocationAssociationDao.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 LocationAssociationDao
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)
LocationAssociationDao.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 LocationAssociationDao
transform
- the transformation flag.search
- the search object which provides the search parameters and pagination specification.public Set<LocationAssociation> search(Search search)
search
object.search
in interface LocationAssociationDao
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.