fr.ifremer.allegro.referential.pmfm
Class UnitDaoBase

java.lang.Object
  extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
      extended by fr.ifremer.allegro.referential.pmfm.UnitDaoBase
All Implemented Interfaces:
UnitDao
Direct Known Subclasses:
UnitDaoImpl

public abstract class UnitDaoBase
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements UnitDao

Base Spring DAO Class: is able to create, update, remove, load, and find objects of type fr.ifremer.allegro.referential.pmfm.Unit.

See Also:
Unit

Field Summary
 
Fields inherited from interface fr.ifremer.allegro.referential.pmfm.UnitDao
TRANSFORM_CLUSTERUNIT, TRANSFORM_NONE, TRANSFORM_REMOTEUNITFULLVO, TRANSFORM_REMOTEUNITNATURALID
 
Constructor Summary
UnitDaoBase()
           
 
Method Summary
 void clusterUnitToEntity(ClusterUnit source, Unit target, boolean copyIfNull)
          Copies the fields of ClusterUnit to the specified entity.
 void clusterUnitToEntityCollection(java.util.Collection instances)
          Converts a Collection of instances of type ClusterUnit to this DAO's entity.
 java.util.Collection create(java.util.Collection entities)
          Creates a new instance of fr.ifremer.allegro.referential.pmfm.Unit and adds from the passed in entities collection
 Unit create(java.util.Date creationDate, java.lang.String name, Status status, java.lang.String symbol)
           Creates a new fr.ifremer.allegro.referential.pmfm.Unit instance from only required properties (attributes and association ends) and adds it to the persistent store.
 java.util.Collection create(int transform, java.util.Collection entities)
           Does the same thing as UnitDao.create(fr.ifremer.allegro.referential.pmfm.Unit) with an additional flag called transform.
 java.lang.Object create(int transform, java.util.Date creationDate, java.lang.String name, Status status, java.lang.String symbol)
           Does the same thing as UnitDao.create(java.util.Date,java.lang.String,fr.ifremer.allegro.referential.Status,java.lang.String) with an additional flag called transform.
 java.lang.Object create(int transform, java.lang.String symbol, java.lang.String name, java.util.Date creationDate, java.sql.Timestamp updateDate, Status status)
           Does the same thing as UnitDao.create(java.lang.String,java.lang.String,java.util.Date,java.sql.Timestamp,fr.ifremer.allegro.referential.Status) with an additional flag called transform.
 java.lang.Object create(int transform, Unit unit)
           Does the same thing as UnitDao.create(fr.ifremer.allegro.referential.pmfm.Unit) with an additional flag called transform.
 Unit create(java.lang.String symbol, java.lang.String name, java.util.Date creationDate, java.sql.Timestamp updateDate, Status status)
           Creates a new fr.ifremer.allegro.referential.pmfm.Unit instance from all attributes and properties and adds it to the persistent store.
 Unit create(Unit unit)
          Creates an instance of fr.ifremer.allegro.referential.pmfm.Unit and adds it to the persistent store.
 Unit createFromClusterUnit(ClusterUnit clusterUnit)
           
 Unit findUnitById(java.lang.Integer id)
           
 java.lang.Object findUnitById(int transform, java.lang.Integer id)
           Does the same thing as UnitDao.findUnitById(java.lang.Integer) with an additional flag called transform.
 java.lang.Object findUnitById(int transform, java.lang.String queryString, java.lang.Integer id)
           Does the same thing as UnitDao.findUnitById(int, java.lang.Integer) with an additional argument called queryString.
 Unit findUnitById(java.lang.String queryString, java.lang.Integer id)
           Does the same thing as UnitDao.findUnitById(java.lang.Integer) with an additional argument called queryString.
 Unit findUnitByNaturalId(java.lang.Integer id)
           
 java.lang.Object findUnitByNaturalId(int transform, java.lang.Integer id)
           Does the same thing as UnitDao.findUnitByNaturalId(java.lang.Integer) with an additional flag called transform.
 java.lang.Object findUnitByNaturalId(int transform, java.lang.String queryString, java.lang.Integer id)
           Does the same thing as UnitDao.findUnitByNaturalId(int, java.lang.Integer) with an additional argument called queryString.
 Unit findUnitByNaturalId(java.lang.String queryString, java.lang.Integer id)
           Does the same thing as UnitDao.findUnitByNaturalId(java.lang.Integer) with an additional argument called queryString.
 java.util.Collection findUnitByStatus(int transform, int pageNumber, int pageSize, Status status)
           Does the same thing as UnitDao.findUnitByStatus(int, fr.ifremer.allegro.referential.Status) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection findUnitByStatus(int pageNumber, int pageSize, Status status)
           Does the same thing as UnitDao.findUnitByStatus(fr.ifremer.allegro.referential.Status) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection findUnitByStatus(int transform, Status status)
           Does the same thing as UnitDao.findUnitByStatus(fr.ifremer.allegro.referential.Status) with an additional flag called transform.
 java.util.Collection findUnitByStatus(int transform, java.lang.String queryString, int pageNumber, int pageSize, Status status)
           Does the same thing as UnitDao.findUnitByStatus(int, String, fr.ifremer.allegro.referential.Status) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection findUnitByStatus(int transform, java.lang.String queryString, Status status)
           Does the same thing as UnitDao.findUnitByStatus(int, fr.ifremer.allegro.referential.Status) with an additional argument called queryString.
 java.util.Collection findUnitByStatus(Status status)
           
 java.util.Collection findUnitByStatus(java.lang.String queryString, int pageNumber, int pageSize, Status status)
           Does the same thing as UnitDao.findUnitByStatus(String, fr.ifremer.allegro.referential.Status) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection findUnitByStatus(java.lang.String queryString, Status status)
           Does the same thing as UnitDao.findUnitByStatus(fr.ifremer.allegro.referential.Status) with an additional argument called queryString.
 ClusterUnit[] getAllClusterUnitSinceDateSynchro(java.sql.Timestamp synchronizationTimestamp, java.lang.Integer userId, java.lang.Integer[] registrationLocationIds, java.lang.Integer pageNumber, java.lang.Integer pageSize)
           
 java.util.Collection getAllUnit()
           
 java.util.Collection getAllUnit(int transform)
           Does the same thing as UnitDao.getAllUnit() with an additional flag called transform.
 java.util.Collection getAllUnit(int pageNumber, int pageSize)
           Does the same thing as UnitDao.getAllUnit() with an additional two arguments called pageNumber and pageSize.
 java.util.Collection getAllUnit(int transform, int pageNumber, int pageSize)
           Does the same thing as UnitDao.getAllUnit(int) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection getAllUnit(int transform, java.lang.String queryString)
           Does the same thing as UnitDao.getAllUnit(int) with an additional argument called queryString.
 java.util.Collection getAllUnit(int transform, java.lang.String queryString, int pageNumber, int pageSize)
           Does the same thing as UnitDao.getAllUnit(int, String) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection getAllUnit(java.lang.String queryString)
           Does the same thing as UnitDao.getAllUnit() with an additional argument called queryString.
 java.util.Collection getAllUnit(java.lang.String queryString, int pageNumber, int pageSize)
           Does the same thing as UnitDao.getAllUnit(String) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection getAllUnitSinceDateSynchro(int transform, int pageNumber, int pageSize, java.sql.Timestamp updateDate)
           Does the same thing as UnitDao.getAllUnitSinceDateSynchro(int, java.sql.Timestamp) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection getAllUnitSinceDateSynchro(int pageNumber, int pageSize, java.sql.Timestamp updateDate)
           Does the same thing as UnitDao.getAllUnitSinceDateSynchro(java.sql.Timestamp) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection getAllUnitSinceDateSynchro(int transform, java.lang.String queryString, int pageNumber, int pageSize, java.sql.Timestamp updateDate)
           Does the same thing as UnitDao.getAllUnitSinceDateSynchro(int, String, java.sql.Timestamp) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection getAllUnitSinceDateSynchro(int transform, java.lang.String queryString, java.sql.Timestamp updateDate)
           Does the same thing as UnitDao.getAllUnitSinceDateSynchro(int, java.sql.Timestamp) with an additional argument called queryString.
 java.util.Collection getAllUnitSinceDateSynchro(int transform, java.sql.Timestamp updateDate)
           Does the same thing as UnitDao.getAllUnitSinceDateSynchro(java.sql.Timestamp) with an additional flag called transform.
 java.util.Collection getAllUnitSinceDateSynchro(java.lang.String queryString, int pageNumber, int pageSize, java.sql.Timestamp updateDate)
           Does the same thing as UnitDao.getAllUnitSinceDateSynchro(String, java.sql.Timestamp) with an additional two arguments called pageNumber and pageSize.
 java.util.Collection getAllUnitSinceDateSynchro(java.lang.String queryString, java.sql.Timestamp updateDate)
           Does the same thing as UnitDao.getAllUnitSinceDateSynchro(java.sql.Timestamp) with an additional argument called queryString.
 java.util.Collection getAllUnitSinceDateSynchro(java.sql.Timestamp updateDate)
           
protected  java.security.Principal getPrincipal()
          Gets the current principal if one has been set, otherwise returns null.
protected  StatusDao getStatusDao()
          Gets the reference to statusDao.
protected abstract  Unit handleCreateFromClusterUnit(ClusterUnit clusterUnit)
          Performs the core logic for createFromClusterUnit(fr.ifremer.allegro.referential.pmfm.generic.cluster.ClusterUnit)
protected abstract  ClusterUnit[] handleGetAllClusterUnitSinceDateSynchro(java.sql.Timestamp synchronizationTimestamp, java.lang.Integer userId, java.lang.Integer[] registrationLocationIds, java.lang.Integer pageNumber, java.lang.Integer pageSize)
          Performs the core logic for getAllClusterUnitSinceDateSynchro(java.sql.Timestamp, java.lang.Integer, java.lang.Integer[], java.lang.Integer, java.lang.Integer)
 Unit load(java.lang.Integer id)
          Loads an instance of fr.ifremer.allegro.referential.pmfm.Unit from the persistent store.
 java.lang.Object load(int transform, java.lang.Integer id)
           Does the same thing as UnitDao.load(java.lang.Integer) with an additional flag called transform.
 java.util.Collection loadAll()
          Loads all entities of type Unit.
 java.util.Collection loadAll(int transform)
           Does the same thing as UnitDao.loadAll() with an additional flag called transform.
 java.util.Collection loadAll(int pageNumber, int pageSize)
           Does the same thing as UnitDao.loadAll() with an additional two arguments called pageNumber and pageSize.
 java.util.Collection loadAll(int transform, int pageNumber, int pageSize)
           Does the same thing as UnitDao.loadAll(int) with an additional two arguments called pageNumber and pageSize.
 void remoteUnitFullVOToEntity(RemoteUnitFullVO source, Unit target, boolean copyIfNull)
          Copies the fields of RemoteUnitFullVO to the specified entity.
 void remoteUnitFullVOToEntityCollection(java.util.Collection instances)
          Converts a Collection of instances of type RemoteUnitFullVO to this DAO's entity.
 void remoteUnitNaturalIdToEntity(RemoteUnitNaturalId source, Unit target, boolean copyIfNull)
          Copies the fields of RemoteUnitNaturalId to the specified entity.
 void remoteUnitNaturalIdToEntityCollection(java.util.Collection instances)
          Converts a Collection of instances of type RemoteUnitNaturalId to this DAO's entity.
 void remove(java.util.Collection entities)
          Removes all entities in the given entities collection.
 void remove(java.lang.Integer id)
          Removes the instance of fr.ifremer.allegro.referential.pmfm.Unit having the given identifier from the persistent store.
 void remove(Unit unit)
          Removes the instance of fr.ifremer.allegro.referential.pmfm.Unit from the persistent store.
 PaginationResult search(int transform, int pageNumber, int pageSize, Search search)
          Does the same thing as {@link #search(int, fr.ifremer.allegro.Search) but with an additional two flags called pageNumber and pageSize.
 PaginationResult search(int pageNumber, int pageSize, Search search)
          Does the same thing as {@link #search(fr.ifremer.allegro.Search) but with an additional two flags called pageNumber and pageSize.
 java.util.Set search(int transform, Search search)
          Does the same thing as UnitDao.search(fr.ifremer.allegro.Search) but with an additional flag called transform.
 java.util.Set search(Search search)
          Performs a search using the parameters specified in the given search object.
 void setStatusDao(StatusDao statusDao)
          Sets the reference to statusDao.
protected  ClusterUnit toClusterUnit(java.lang.Object[] row)
          Default implementation for transforming the results of a report query into a value object.
 ClusterUnit toClusterUnit(Unit entity)
          Converts this DAO's entity to an object of type ClusterUnit.
 void toClusterUnit(Unit source, ClusterUnit target)
          Copies the fields of the specified entity to the target value object.
 ClusterUnit[] toClusterUnitArray(java.util.Collection entities)
          Converts this DAO's entity to an array of instances of type ClusterUnit.
 void toClusterUnitCollection(java.util.Collection entities)
          Converts this DAO's entity to a Collection of instances of type ClusterUnit.
protected  Unit toEntity(java.lang.Object[] row)
           
protected  RemoteUnitFullVO toRemoteUnitFullVO(java.lang.Object[] row)
          Default implementation for transforming the results of a report query into a value object.
 RemoteUnitFullVO toRemoteUnitFullVO(Unit entity)
          Converts this DAO's entity to an object of type RemoteUnitFullVO.
 void toRemoteUnitFullVO(Unit source, RemoteUnitFullVO target)
          Copies the fields of the specified entity to the target value object.
 RemoteUnitFullVO[] toRemoteUnitFullVOArray(java.util.Collection entities)
          Converts this DAO's entity to an array of instances of type RemoteUnitFullVO.
 void toRemoteUnitFullVOCollection(java.util.Collection entities)
          Converts this DAO's entity to a Collection of instances of type RemoteUnitFullVO.
protected  RemoteUnitNaturalId toRemoteUnitNaturalId(java.lang.Object[] row)
          Default implementation for transforming the results of a report query into a value object.
 RemoteUnitNaturalId toRemoteUnitNaturalId(Unit entity)
          Converts this DAO's entity to an object of type RemoteUnitNaturalId.
 void toRemoteUnitNaturalId(Unit source, RemoteUnitNaturalId target)
          Copies the fields of the specified entity to the target value object.
 RemoteUnitNaturalId[] toRemoteUnitNaturalIdArray(java.util.Collection entities)
          Converts this DAO's entity to an array of instances of type RemoteUnitNaturalId.
 void toRemoteUnitNaturalIdCollection(java.util.Collection entities)
          Converts this DAO's entity to a Collection of instances of type RemoteUnitNaturalId.
protected  void transformEntities(int transform, java.util.Collection entities)
          Transforms a collection of entities using the transformEntity(int,fr.ifremer.allegro.referential.pmfm.Unit) method.
protected  java.lang.Object transformEntity(int transform, Unit 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 fr.ifremer.allegro.referential.pmfm.UnitDao, please note that the UnitDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be returned.
 void update(java.util.Collection entities)
          Updates all instances in the entities collection in the persistent store.
 void update(Unit unit)
          Updates the unit instance in the persistent store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.ifremer.allegro.referential.pmfm.UnitDao
clusterUnitToEntity, remoteUnitFullVOToEntity, remoteUnitNaturalIdToEntity
 

Constructor Detail

UnitDaoBase

public UnitDaoBase()
Method Detail

setStatusDao

public void setStatusDao(StatusDao statusDao)
Sets the reference to statusDao.


getStatusDao

protected StatusDao getStatusDao()
Gets the reference to statusDao.


load

public java.lang.Object load(int transform,
                             java.lang.Integer id)
Description copied from interface: UnitDao

Does the same thing as UnitDao.load(java.lang.Integer) 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.

Specified by:
load in interface UnitDao
id - identifier of the entity to load
Returns:
either the entity or the object transformed from the entity.
See Also:
UnitDao.load(int, java.lang.Integer)

load

public Unit load(java.lang.Integer id)
Description copied from interface: UnitDao
Loads an instance of fr.ifremer.allegro.referential.pmfm.Unit from the persistent store.

Specified by:
load in interface UnitDao
See Also:
UnitDao.load(java.lang.Integer)

loadAll

public java.util.Collection loadAll()
Description copied from interface: UnitDao
Loads all entities of type Unit.

Specified by:
loadAll in interface UnitDao
Returns:
the loaded entities.
See Also:
UnitDao.loadAll()

loadAll

public java.util.Collection loadAll(int transform)
Description copied from interface: UnitDao

Does the same thing as UnitDao.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.

Specified by:
loadAll in interface UnitDao
Parameters:
transform - the flag indicating what transformation to use.
Returns:
the loaded entities.
See Also:
UnitDao.loadAll(int)

loadAll

public java.util.Collection loadAll(int pageNumber,
                                    int pageSize)
Description copied from interface: UnitDao

Does the same thing as UnitDao.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.

Specified by:
loadAll in interface UnitDao
Parameters:
pageNumber - the page number to retrieve when paging results.
pageSize - the size of the page to retrieve when paging results.
Returns:
the loaded entities.
See Also:
UnitDao.loadAll(int, int)

loadAll

public java.util.Collection loadAll(int transform,
                                    int pageNumber,
                                    int pageSize)
Description copied from interface: UnitDao

Does the same thing as UnitDao.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.

Specified by:
loadAll in interface UnitDao
Parameters:
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.
Returns:
the loaded entities.
See Also:
UnitDao.loadAll(int, int, int)

create

public Unit create(Unit unit)
Description copied from interface: UnitDao
Creates an instance of fr.ifremer.allegro.referential.pmfm.Unit and adds it to the persistent store.

Specified by:
create in interface UnitDao
See Also:
UnitDao.create(fr.ifremer.allegro.referential.pmfm.Unit)

create

public java.lang.Object create(int transform,
                               Unit unit)
Description copied from interface: UnitDao

Does the same thing as UnitDao.create(fr.ifremer.allegro.referential.pmfm.Unit) 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.

Specified by:
create in interface UnitDao
See Also:
UnitDao.create(int transform, fr.ifremer.allegro.referential.pmfm.Unit)

create

public java.util.Collection create(java.util.Collection entities)
Description copied from interface: UnitDao
Creates a new instance of fr.ifremer.allegro.referential.pmfm.Unit and adds from the passed in entities collection

Specified by:
create in interface UnitDao
Parameters:
entities - the collection of fr.ifremer.allegro.referential.pmfm.Unit instances to create.
Returns:
the created instances.
See Also:
UnitDao.create(java.util.Collection)

create

public java.util.Collection create(int transform,
                                   java.util.Collection entities)
Description copied from interface: UnitDao

Does the same thing as UnitDao.create(fr.ifremer.allegro.referential.pmfm.Unit) 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.

Specified by:
create in interface UnitDao
See Also:
UnitDao.create(int, java.util.Collection)

create

public Unit create(java.lang.String symbol,
                   java.lang.String name,
                   java.util.Date creationDate,
                   java.sql.Timestamp updateDate,
                   Status status)
Description copied from interface: UnitDao

Creates a new fr.ifremer.allegro.referential.pmfm.Unit instance from all attributes and properties and adds it to the persistent store.

Specified by:
create in interface UnitDao
See Also:
UnitDao.create(java.lang.String,java.lang.String,java.util.Date,java.sql.Timestamp,fr.ifremer.allegro.referential.Status)

create

public java.lang.Object create(int transform,
                               java.lang.String symbol,
                               java.lang.String name,
                               java.util.Date creationDate,
                               java.sql.Timestamp updateDate,
                               Status status)
Description copied from interface: UnitDao

Does the same thing as UnitDao.create(java.lang.String,java.lang.String,java.util.Date,java.sql.Timestamp,fr.ifremer.allegro.referential.Status) 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.

Specified by:
create in interface UnitDao
See Also:
UnitDao.create(int, java.lang.String,java.lang.String,java.util.Date,java.sql.Timestamp,fr.ifremer.allegro.referential.Status)

create

public Unit create(java.util.Date creationDate,
                   java.lang.String name,
                   Status status,
                   java.lang.String symbol)
Description copied from interface: UnitDao

Creates a new fr.ifremer.allegro.referential.pmfm.Unit instance from only required properties (attributes and association ends) and adds it to the persistent store.

Specified by:
create in interface UnitDao
See Also:
UnitDao.create(java.util.Date,java.lang.String,fr.ifremer.allegro.referential.Status,java.lang.String)

create

public java.lang.Object create(int transform,
                               java.util.Date creationDate,
                               java.lang.String name,
                               Status status,
                               java.lang.String symbol)
Description copied from interface: UnitDao

Does the same thing as UnitDao.create(java.util.Date,java.lang.String,fr.ifremer.allegro.referential.Status,java.lang.String) with an additional flag called transform. If this flag is set to TRANSFORM_NONE then the returned entity will NOTWILL BE passed through an operation which can optionally transform the entity (into a value object for example). By default, transformation does not occur.

Specified by:
create in interface UnitDao
See Also:
UnitDao.create(int, java.util.Date,java.lang.String,fr.ifremer.allegro.referential.Status,java.lang.String)

update

public void update(Unit unit)
Description copied from interface: UnitDao
Updates the unit instance in the persistent store.

Specified by:
update in interface UnitDao
See Also:
UnitDao.update(fr.ifremer.allegro.referential.pmfm.Unit)

update

public void update(java.util.Collection entities)
Description copied from interface: UnitDao
Updates all instances in the entities collection in the persistent store.

Specified by:
update in interface UnitDao
See Also:
UnitDao.update(java.util.Collection)

remove

public void remove(Unit unit)
Description copied from interface: UnitDao
Removes the instance of fr.ifremer.allegro.referential.pmfm.Unit from the persistent store.

Specified by:
remove in interface UnitDao
See Also:
UnitDao.remove(fr.ifremer.allegro.referential.pmfm.Unit)

remove

public void remove(java.lang.Integer id)
Description copied from interface: UnitDao
Removes the instance of fr.ifremer.allegro.referential.pmfm.Unit having the given identifier from the persistent store.

Specified by:
remove in interface UnitDao
See Also:
UnitDao.remove(java.lang.Integer)

remove

public void remove(java.util.Collection entities)
Description copied from interface: UnitDao
Removes all entities in the given entities collection.

Specified by:
remove in interface UnitDao
See Also:
UnitDao.remove(java.util.Collection)

getAllUnit

public java.util.Collection getAllUnit()
Specified by:
getAllUnit in interface UnitDao
See Also:
UnitDao.getAllUnit()

getAllUnit

public java.util.Collection getAllUnit(int transform)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnit() 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 finder results WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
getAllUnit in interface UnitDao
See Also:
UnitDao.getAllUnit(int)

getAllUnit

public java.util.Collection getAllUnit(java.lang.String queryString)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnit() with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.getAllUnit().

Specified by:
getAllUnit in interface UnitDao
See Also:
UnitDao.getAllUnit(java.lang.String)

getAllUnit

public java.util.Collection getAllUnit(int pageNumber,
                                       int pageSize)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnit() 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.

Specified by:
getAllUnit in interface UnitDao
See Also:
UnitDao.getAllUnit(int, int)

getAllUnit

public java.util.Collection getAllUnit(java.lang.String queryString,
                                       int pageNumber,
                                       int pageSize)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnit(String) 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.

Specified by:
getAllUnit in interface UnitDao
See Also:
UnitDao.getAllUnit(String, int, int)

getAllUnit

public java.util.Collection getAllUnit(int transform,
                                       java.lang.String queryString)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnit(int) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.getAllUnit(int).

Specified by:
getAllUnit in interface UnitDao
See Also:
UnitDao.getAllUnit(int, String)

getAllUnit

public java.util.Collection getAllUnit(int transform,
                                       int pageNumber,
                                       int pageSize)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnit(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.

Specified by:
getAllUnit in interface UnitDao
See Also:
UnitDao.getAllUnit(int, int, int)

getAllUnit

public java.util.Collection getAllUnit(int transform,
                                       java.lang.String queryString,
                                       int pageNumber,
                                       int pageSize)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnit(int, String) 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.

Specified by:
getAllUnit in interface UnitDao
See Also:
UnitDao.getAllUnit(int, java.lang.String, int, int)

findUnitById

public Unit findUnitById(java.lang.Integer id)
Specified by:
findUnitById in interface UnitDao
See Also:
UnitDao.findUnitById(java.lang.Integer)

findUnitById

public java.lang.Object findUnitById(int transform,
                                     java.lang.Integer id)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitById(java.lang.Integer) 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 finder results WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
findUnitById in interface UnitDao
See Also:
UnitDao.findUnitById(int, java.lang.Integer)

findUnitById

public Unit findUnitById(java.lang.String queryString,
                         java.lang.Integer id)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitById(java.lang.Integer) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.findUnitById(java.lang.Integer).

Specified by:
findUnitById in interface UnitDao
See Also:
UnitDao.findUnitById(java.lang.String, java.lang.Integer)

findUnitById

public java.lang.Object findUnitById(int transform,
                                     java.lang.String queryString,
                                     java.lang.Integer id)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitById(int, java.lang.Integer) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.findUnitById(int, java.lang.Integer id).

Specified by:
findUnitById in interface UnitDao
See Also:
UnitDao.findUnitById(int, java.lang.String, java.lang.Integer)

findUnitByStatus

public java.util.Collection findUnitByStatus(Status status)
Specified by:
findUnitByStatus in interface UnitDao
See Also:
UnitDao.findUnitByStatus(fr.ifremer.allegro.referential.Status)

findUnitByStatus

public java.util.Collection findUnitByStatus(int transform,
                                             Status status)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByStatus(fr.ifremer.allegro.referential.Status) 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 finder results WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
findUnitByStatus in interface UnitDao
See Also:
UnitDao.findUnitByStatus(int, fr.ifremer.allegro.referential.Status)

findUnitByStatus

public java.util.Collection findUnitByStatus(java.lang.String queryString,
                                             Status status)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByStatus(fr.ifremer.allegro.referential.Status) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.findUnitByStatus(fr.ifremer.allegro.referential.Status).

Specified by:
findUnitByStatus in interface UnitDao
See Also:
UnitDao.findUnitByStatus(java.lang.String, fr.ifremer.allegro.referential.Status)

findUnitByStatus

public java.util.Collection findUnitByStatus(int pageNumber,
                                             int pageSize,
                                             Status status)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByStatus(fr.ifremer.allegro.referential.Status) 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.

Specified by:
findUnitByStatus in interface UnitDao
See Also:
UnitDao.findUnitByStatus(int, int, fr.ifremer.allegro.referential.Status)

findUnitByStatus

public java.util.Collection findUnitByStatus(java.lang.String queryString,
                                             int pageNumber,
                                             int pageSize,
                                             Status status)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByStatus(String, fr.ifremer.allegro.referential.Status) 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.

Specified by:
findUnitByStatus in interface UnitDao
See Also:
UnitDao.findUnitByStatus(String, int, int, fr.ifremer.allegro.referential.Status)

findUnitByStatus

public java.util.Collection findUnitByStatus(int transform,
                                             java.lang.String queryString,
                                             Status status)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByStatus(int, fr.ifremer.allegro.referential.Status) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.findUnitByStatus(int, fr.ifremer.allegro.referential.Status status).

Specified by:
findUnitByStatus in interface UnitDao
See Also:
UnitDao.findUnitByStatus(int, String, fr.ifremer.allegro.referential.Status)

findUnitByStatus

public java.util.Collection findUnitByStatus(int transform,
                                             int pageNumber,
                                             int pageSize,
                                             Status status)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByStatus(int, fr.ifremer.allegro.referential.Status) 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.

Specified by:
findUnitByStatus in interface UnitDao
See Also:
UnitDao.findUnitByStatus(int, int, int, fr.ifremer.allegro.referential.Status)

findUnitByStatus

public java.util.Collection findUnitByStatus(int transform,
                                             java.lang.String queryString,
                                             int pageNumber,
                                             int pageSize,
                                             Status status)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByStatus(int, String, fr.ifremer.allegro.referential.Status) 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.

Specified by:
findUnitByStatus in interface UnitDao
See Also:
UnitDao.findUnitByStatus(int, java.lang.String, int, int, fr.ifremer.allegro.referential.Status)

findUnitByNaturalId

public Unit findUnitByNaturalId(java.lang.Integer id)
Specified by:
findUnitByNaturalId in interface UnitDao
See Also:
UnitDao.findUnitByNaturalId(java.lang.Integer)

findUnitByNaturalId

public java.lang.Object findUnitByNaturalId(int transform,
                                            java.lang.Integer id)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByNaturalId(java.lang.Integer) 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 finder results WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
findUnitByNaturalId in interface UnitDao
See Also:
UnitDao.findUnitByNaturalId(int, java.lang.Integer)

findUnitByNaturalId

public Unit findUnitByNaturalId(java.lang.String queryString,
                                java.lang.Integer id)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByNaturalId(java.lang.Integer) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.findUnitByNaturalId(java.lang.Integer).

Specified by:
findUnitByNaturalId in interface UnitDao
See Also:
UnitDao.findUnitByNaturalId(java.lang.String, java.lang.Integer)

findUnitByNaturalId

public java.lang.Object findUnitByNaturalId(int transform,
                                            java.lang.String queryString,
                                            java.lang.Integer id)
Description copied from interface: UnitDao

Does the same thing as UnitDao.findUnitByNaturalId(int, java.lang.Integer) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.findUnitByNaturalId(int, java.lang.Integer id).

Specified by:
findUnitByNaturalId in interface UnitDao
See Also:
UnitDao.findUnitByNaturalId(int, java.lang.String, java.lang.Integer)

getAllUnitSinceDateSynchro

public java.util.Collection getAllUnitSinceDateSynchro(java.sql.Timestamp updateDate)
Specified by:
getAllUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllUnitSinceDateSynchro(java.sql.Timestamp)

getAllUnitSinceDateSynchro

public java.util.Collection getAllUnitSinceDateSynchro(int transform,
                                                       java.sql.Timestamp updateDate)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnitSinceDateSynchro(java.sql.Timestamp) 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 finder results WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
getAllUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllUnitSinceDateSynchro(int, java.sql.Timestamp)

getAllUnitSinceDateSynchro

public java.util.Collection getAllUnitSinceDateSynchro(java.lang.String queryString,
                                                       java.sql.Timestamp updateDate)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnitSinceDateSynchro(java.sql.Timestamp) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.getAllUnitSinceDateSynchro(java.sql.Timestamp).

Specified by:
getAllUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllUnitSinceDateSynchro(java.lang.String, java.sql.Timestamp)

getAllUnitSinceDateSynchro

public java.util.Collection getAllUnitSinceDateSynchro(int pageNumber,
                                                       int pageSize,
                                                       java.sql.Timestamp updateDate)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnitSinceDateSynchro(java.sql.Timestamp) 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.

Specified by:
getAllUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllUnitSinceDateSynchro(int, int, java.sql.Timestamp)

getAllUnitSinceDateSynchro

public java.util.Collection getAllUnitSinceDateSynchro(java.lang.String queryString,
                                                       int pageNumber,
                                                       int pageSize,
                                                       java.sql.Timestamp updateDate)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnitSinceDateSynchro(String, java.sql.Timestamp) 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.

Specified by:
getAllUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllUnitSinceDateSynchro(String, int, int, java.sql.Timestamp)

getAllUnitSinceDateSynchro

public java.util.Collection getAllUnitSinceDateSynchro(int transform,
                                                       java.lang.String queryString,
                                                       java.sql.Timestamp updateDate)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnitSinceDateSynchro(int, java.sql.Timestamp) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UnitDao.getAllUnitSinceDateSynchro(int, java.sql.Timestamp updateDate).

Specified by:
getAllUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllUnitSinceDateSynchro(int, String, java.sql.Timestamp)

getAllUnitSinceDateSynchro

public java.util.Collection getAllUnitSinceDateSynchro(int transform,
                                                       int pageNumber,
                                                       int pageSize,
                                                       java.sql.Timestamp updateDate)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnitSinceDateSynchro(int, java.sql.Timestamp) 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.

Specified by:
getAllUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllUnitSinceDateSynchro(int, int, int, java.sql.Timestamp)

getAllUnitSinceDateSynchro

public java.util.Collection getAllUnitSinceDateSynchro(int transform,
                                                       java.lang.String queryString,
                                                       int pageNumber,
                                                       int pageSize,
                                                       java.sql.Timestamp updateDate)
Description copied from interface: UnitDao

Does the same thing as UnitDao.getAllUnitSinceDateSynchro(int, String, java.sql.Timestamp) 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.

Specified by:
getAllUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllUnitSinceDateSynchro(int, java.lang.String, int, int, java.sql.Timestamp)

createFromClusterUnit

public Unit createFromClusterUnit(ClusterUnit clusterUnit)
Specified by:
createFromClusterUnit in interface UnitDao
See Also:
UnitDao.createFromClusterUnit(fr.ifremer.allegro.referential.pmfm.generic.cluster.ClusterUnit)

handleCreateFromClusterUnit

protected abstract Unit handleCreateFromClusterUnit(ClusterUnit clusterUnit)
                                             throws java.lang.Exception
Performs the core logic for createFromClusterUnit(fr.ifremer.allegro.referential.pmfm.generic.cluster.ClusterUnit)

Throws:
java.lang.Exception

getAllClusterUnitSinceDateSynchro

public ClusterUnit[] getAllClusterUnitSinceDateSynchro(java.sql.Timestamp synchronizationTimestamp,
                                                       java.lang.Integer userId,
                                                       java.lang.Integer[] registrationLocationIds,
                                                       java.lang.Integer pageNumber,
                                                       java.lang.Integer pageSize)
Specified by:
getAllClusterUnitSinceDateSynchro in interface UnitDao
See Also:
UnitDao.getAllClusterUnitSinceDateSynchro(java.sql.Timestamp, java.lang.Integer, java.lang.Integer[], java.lang.Integer, java.lang.Integer)

handleGetAllClusterUnitSinceDateSynchro

protected abstract ClusterUnit[] handleGetAllClusterUnitSinceDateSynchro(java.sql.Timestamp synchronizationTimestamp,
                                                                         java.lang.Integer userId,
                                                                         java.lang.Integer[] registrationLocationIds,
                                                                         java.lang.Integer pageNumber,
                                                                         java.lang.Integer pageSize)
                                                                  throws java.lang.Exception
Performs the core logic for getAllClusterUnitSinceDateSynchro(java.sql.Timestamp, java.lang.Integer, java.lang.Integer[], java.lang.Integer, java.lang.Integer)

Throws:
java.lang.Exception

transformEntity

protected java.lang.Object transformEntity(int transform,
                                           Unit 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 fr.ifremer.allegro.referential.pmfm.UnitDao, please note that the UnitDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be returned.

This method will return instances of these types:

If the integer argument value is unknown UnitDao.TRANSFORM_NONE is assumed.

Parameters:
transform - one of the constants declared in UnitDao
entity - an entity that was found
Returns:
the transformed entity (i.e. new value object, etc)
See Also:
transformEntities(int,java.util.Collection)

transformEntities

protected void transformEntities(int transform,
                                 java.util.Collection entities)
Transforms a collection of entities using the transformEntity(int,fr.ifremer.allegro.referential.pmfm.Unit) method. This method does not instantiate a new collection.

This method is to be used internally only.

Parameters:
transform - one of the constants declared in fr.ifremer.allegro.referential.pmfm.UnitDao
entities - the collection of entities to transform
See Also:
transformEntity(int,fr.ifremer.allegro.referential.pmfm.Unit)

toEntity

protected Unit toEntity(java.lang.Object[] row)

toRemoteUnitFullVOCollection

public final void toRemoteUnitFullVOCollection(java.util.Collection entities)
Description copied from interface: UnitDao
Converts this DAO's entity to a Collection of instances of type RemoteUnitFullVO.

Specified by:
toRemoteUnitFullVOCollection in interface UnitDao
See Also:
UnitDao.toRemoteUnitFullVOCollection(java.util.Collection)

toRemoteUnitFullVOArray

public final RemoteUnitFullVO[] toRemoteUnitFullVOArray(java.util.Collection entities)
Description copied from interface: UnitDao
Converts this DAO's entity to an array of instances of type RemoteUnitFullVO.

Specified by:
toRemoteUnitFullVOArray in interface UnitDao
See Also:
UnitDao.toRemoteUnitFullVOArray(java.util.Collection)

toRemoteUnitFullVO

protected RemoteUnitFullVO toRemoteUnitFullVO(java.lang.Object[] row)
Default implementation for transforming the results of a report query into a value object. This implementation exists for convenience reasons only. It needs only be overridden in the UnitDaoImpl class if you intend to use reporting queries.

See Also:
UnitDao.toRemoteUnitFullVO(fr.ifremer.allegro.referential.pmfm.Unit)

remoteUnitFullVOToEntityCollection

public final void remoteUnitFullVOToEntityCollection(java.util.Collection instances)
Description copied from interface: UnitDao
Converts a Collection of instances of type RemoteUnitFullVO to this DAO's entity.

Specified by:
remoteUnitFullVOToEntityCollection in interface UnitDao
See Also:
UnitDao.remoteUnitFullVOToEntityCollection(java.util.Collection)

toRemoteUnitFullVO

public void toRemoteUnitFullVO(Unit source,
                               RemoteUnitFullVO target)
Description copied from interface: UnitDao
Copies the fields of the specified entity to the target value object. This method is similar to toRemoteUnitFullVO(), but it does not handle any attributes in the target value object that are "read-only" (as those do not have setter methods exposed).

Specified by:
toRemoteUnitFullVO in interface UnitDao
See Also:
UnitDao.toRemoteUnitFullVO(fr.ifremer.allegro.referential.pmfm.Unit, fr.ifremer.allegro.referential.pmfm.generic.vo.RemoteUnitFullVO)

toRemoteUnitFullVO

public RemoteUnitFullVO toRemoteUnitFullVO(Unit entity)
Description copied from interface: UnitDao
Converts this DAO's entity to an object of type RemoteUnitFullVO.

Specified by:
toRemoteUnitFullVO in interface UnitDao
See Also:
UnitDao.toRemoteUnitFullVO(fr.ifremer.allegro.referential.pmfm.Unit)

remoteUnitFullVOToEntity

public void remoteUnitFullVOToEntity(RemoteUnitFullVO source,
                                     Unit target,
                                     boolean copyIfNull)
Description copied from interface: UnitDao
Copies the fields of RemoteUnitFullVO to the specified entity.

Specified by:
remoteUnitFullVOToEntity in interface UnitDao
copyIfNull - If FALSE, the value object's field will not be copied to the entity if the value is NULL. If TRUE, it will be copied regardless of its value.
See Also:
fr.ifremer.allegro.referential.pmfm.UnitDao#remoteUnitFullVOToEntity(fr.ifremer.allegro.referential.pmfm.generic.vo.RemoteUnitFullVO, fr.ifremer.allegro.referential.pmfm.Unit)

toRemoteUnitNaturalIdCollection

public final void toRemoteUnitNaturalIdCollection(java.util.Collection entities)
Description copied from interface: UnitDao
Converts this DAO's entity to a Collection of instances of type RemoteUnitNaturalId.

Specified by:
toRemoteUnitNaturalIdCollection in interface UnitDao
See Also:
UnitDao.toRemoteUnitNaturalIdCollection(java.util.Collection)

toRemoteUnitNaturalIdArray

public final RemoteUnitNaturalId[] toRemoteUnitNaturalIdArray(java.util.Collection entities)
Description copied from interface: UnitDao
Converts this DAO's entity to an array of instances of type RemoteUnitNaturalId.

Specified by:
toRemoteUnitNaturalIdArray in interface UnitDao
See Also:
UnitDao.toRemoteUnitNaturalIdArray(java.util.Collection)

toRemoteUnitNaturalId

protected RemoteUnitNaturalId toRemoteUnitNaturalId(java.lang.Object[] row)
Default implementation for transforming the results of a report query into a value object. This implementation exists for convenience reasons only. It needs only be overridden in the UnitDaoImpl class if you intend to use reporting queries.

See Also:
UnitDao.toRemoteUnitNaturalId(fr.ifremer.allegro.referential.pmfm.Unit)

remoteUnitNaturalIdToEntityCollection

public final void remoteUnitNaturalIdToEntityCollection(java.util.Collection instances)
Description copied from interface: UnitDao
Converts a Collection of instances of type RemoteUnitNaturalId to this DAO's entity.

Specified by:
remoteUnitNaturalIdToEntityCollection in interface UnitDao
See Also:
UnitDao.remoteUnitNaturalIdToEntityCollection(java.util.Collection)

toRemoteUnitNaturalId

public void toRemoteUnitNaturalId(Unit source,
                                  RemoteUnitNaturalId target)
Description copied from interface: UnitDao
Copies the fields of the specified entity to the target value object. This method is similar to toRemoteUnitNaturalId(), but it does not handle any attributes in the target value object that are "read-only" (as those do not have setter methods exposed).

Specified by:
toRemoteUnitNaturalId in interface UnitDao
See Also:
UnitDao.toRemoteUnitNaturalId(fr.ifremer.allegro.referential.pmfm.Unit, fr.ifremer.allegro.referential.pmfm.generic.vo.RemoteUnitNaturalId)

toRemoteUnitNaturalId

public RemoteUnitNaturalId toRemoteUnitNaturalId(Unit entity)
Description copied from interface: UnitDao
Converts this DAO's entity to an object of type RemoteUnitNaturalId.

Specified by:
toRemoteUnitNaturalId in interface UnitDao
See Also:
UnitDao.toRemoteUnitNaturalId(fr.ifremer.allegro.referential.pmfm.Unit)

remoteUnitNaturalIdToEntity

public void remoteUnitNaturalIdToEntity(RemoteUnitNaturalId source,
                                        Unit target,
                                        boolean copyIfNull)
Description copied from interface: UnitDao
Copies the fields of RemoteUnitNaturalId to the specified entity.

Specified by:
remoteUnitNaturalIdToEntity in interface UnitDao
copyIfNull - If FALSE, the value object's field will not be copied to the entity if the value is NULL. If TRUE, it will be copied regardless of its value.
See Also:
fr.ifremer.allegro.referential.pmfm.UnitDao#remoteUnitNaturalIdToEntity(fr.ifremer.allegro.referential.pmfm.generic.vo.RemoteUnitNaturalId, fr.ifremer.allegro.referential.pmfm.Unit)

toClusterUnitCollection

public final void toClusterUnitCollection(java.util.Collection entities)
Description copied from interface: UnitDao
Converts this DAO's entity to a Collection of instances of type ClusterUnit.

Specified by:
toClusterUnitCollection in interface UnitDao
See Also:
UnitDao.toClusterUnitCollection(java.util.Collection)

toClusterUnitArray

public final ClusterUnit[] toClusterUnitArray(java.util.Collection entities)
Description copied from interface: UnitDao
Converts this DAO's entity to an array of instances of type ClusterUnit.

Specified by:
toClusterUnitArray in interface UnitDao
See Also:
UnitDao.toClusterUnitArray(java.util.Collection)

toClusterUnit

protected ClusterUnit toClusterUnit(java.lang.Object[] row)
Default implementation for transforming the results of a report query into a value object. This implementation exists for convenience reasons only. It needs only be overridden in the UnitDaoImpl class if you intend to use reporting queries.

See Also:
UnitDao.toClusterUnit(fr.ifremer.allegro.referential.pmfm.Unit)

clusterUnitToEntityCollection

public final void clusterUnitToEntityCollection(java.util.Collection instances)
Description copied from interface: UnitDao
Converts a Collection of instances of type ClusterUnit to this DAO's entity.

Specified by:
clusterUnitToEntityCollection in interface UnitDao
See Also:
UnitDao.clusterUnitToEntityCollection(java.util.Collection)

toClusterUnit

public void toClusterUnit(Unit source,
                          ClusterUnit target)
Description copied from interface: UnitDao
Copies the fields of the specified entity to the target value object. This method is similar to toClusterUnit(), but it does not handle any attributes in the target value object that are "read-only" (as those do not have setter methods exposed).

Specified by:
toClusterUnit in interface UnitDao
See Also:
UnitDao.toClusterUnit(fr.ifremer.allegro.referential.pmfm.Unit, fr.ifremer.allegro.referential.pmfm.generic.cluster.ClusterUnit)

toClusterUnit

public ClusterUnit toClusterUnit(Unit entity)
Description copied from interface: UnitDao
Converts this DAO's entity to an object of type ClusterUnit.

Specified by:
toClusterUnit in interface UnitDao
See Also:
UnitDao.toClusterUnit(fr.ifremer.allegro.referential.pmfm.Unit)

clusterUnitToEntity

public void clusterUnitToEntity(ClusterUnit source,
                                Unit target,
                                boolean copyIfNull)
Description copied from interface: UnitDao
Copies the fields of ClusterUnit to the specified entity.

Specified by:
clusterUnitToEntity in interface UnitDao
copyIfNull - If FALSE, the value object's field will not be copied to the entity if the value is NULL. If TRUE, it will be copied regardless of its value.
See Also:
fr.ifremer.allegro.referential.pmfm.UnitDao#clusterUnitToEntity(fr.ifremer.allegro.referential.pmfm.generic.cluster.ClusterUnit, fr.ifremer.allegro.referential.pmfm.Unit)

getPrincipal

protected java.security.Principal getPrincipal()
Gets the current principal if one has been set, otherwise returns null.

Returns:
the current principal

search

public PaginationResult search(int transform,
                               int pageNumber,
                               int pageSize,
                               Search search)
Description copied from interface: UnitDao
Does the same thing as {@link #search(int, fr.ifremer.allegro.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.

Specified by:
search in interface UnitDao
Parameters:
transform - the transformation flag.
pageNumber - the page number in the data to retrieve
pageSize - the size of the page to retrieve.
search - the search object which provides the search parameters and pagination specification.
Returns:
any found results from the search wrapped in a PaginationResult instance.
See Also:
UnitDao.search(int, int, int, fr.ifremer.allegro.Search)

search

public PaginationResult search(int pageNumber,
                               int pageSize,
                               Search search)
Description copied from interface: UnitDao
Does the same thing as {@link #search(fr.ifremer.allegro.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.

Specified by:
search in interface UnitDao
Parameters:
pageNumber - the page number in the data to retrieve
pageSize - the size of the page to retrieve.
search - the search object which provides the search parameters and pagination specification.
Returns:
any found results from the search wrapped in a PaginationResult instance.
See Also:
UnitDao.search(int, int, fr.ifremer.allegro.Search)

search

public java.util.Set search(int transform,
                            Search search)
Description copied from interface: UnitDao
Does the same thing as UnitDao.search(fr.ifremer.allegro.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.

Specified by:
search in interface UnitDao
Parameters:
transform - the transformation flag.
search - the search object which provides the search parameters and pagination specification.
Returns:
any found results from the search.
See Also:
UnitDao.search(int, fr.ifremer.allegro.Search)

search

public java.util.Set search(Search search)
Description copied from interface: UnitDao
Performs a search using the parameters specified in the given search object.

Specified by:
search in interface UnitDao
Parameters:
search - the search object which provides the search parameters and pagination specification.
Returns:
any found results from the search.
See Also:
UnitDao.search(fr.ifremer.allegro.Search)


Copyright © 2008-2010 IFREMER. All Rights Reserved.