Interface TopiaDAO<E extends TopiaEntity>

Type Parameters:
E - the entity type managed by the dao
All Superinterfaces:
java.lang.Iterable<E>, TopiaDAODeprecated<E>
All Known Implementing Classes:
TopiaDAOImpl, TopiaDAOLegacy

public interface TopiaDAO<E extends TopiaEntity>
extends TopiaDAODeprecated<E>, java.lang.Iterable<E>
TopiaDAO is used to manipulate entities corresponding to E type : create, delete, update or find entities. This interface is implemented by TopiaDAOImpl overridden by generation from EntityDAOTransformer.
Version:
$Id$
Author:
bpoussin <poussin@codelutin.com>, fdesbois <fdesbois@codelutin.com>, tchemit <chemit@codelutin.com>
  • Method Summary

    Modifier and Type Method Description
    void addTopiaEntityListener​(TopiaEntityListener listener)  
    void addTopiaEntityVetoable​(TopiaEntityVetoable vetoable)  
    void computeAndAddRecordsToPager​(java.lang.String hql, TopiaPagerBean pager, java.lang.Object... params)
    Execute the count hql query and then synch the pager to this result (says fill the PagerBean.getRecords() field and then adapt the number of pages available and the current number page).
    long count()
    Count the number of existing entities.
    long countByQuery​(java.lang.String hql, java.lang.Object... params)
    Count the number of entities based on a hql.
    E create​(E e)
    Permet de sauver un object instancié sans le DAO.
    E create​(java.lang.Object... properties)
    Construit une nouvelle instance de l'objet géré par ce DAO
    E create​(java.util.Map<java.lang.String,​java.lang.Object> properties)
    Construit une nouvelle instance de l'objet géré par ce DAO
    java.lang.String createSimpleQuery​(java.lang.String alias)
    Create the simple hql query for the entity managed by the dao.
    void delete​(E e)
    Permet de supprimer une entite.
    void deleteAll​(java.lang.Iterable<E> entities)
    Permet de supprimer des entités.
    boolean existByProperties​(java.lang.String propertyName, java.lang.Object propertyValue, java.lang.Object... others)
    Check the existence of an entity with propertyName with propertyValue.
    boolean existByTopiaId​(java.lang.String id)
    Check the existence of an entity with technical id.
    boolean existsByQuery​(java.lang.String hql, java.lang.Object... params)
    Check the existence of an entity using a hql query.
    java.util.List<E> findAll()
    Gets all entitys of the dao type in db.
    java.util.List<E> findAllByProperties​(java.lang.String propertyName, java.lang.Object value, java.lang.Object... others)
    Gets all entities of the dao type matching the value for the given propertyName and others.
    java.util.List<E> findAllByProperties​(java.util.Map<java.lang.String,​java.lang.Object> properties)
    Gets all entities of the dao type matching all the properties.
    java.util.List<E> findAllByProperty​(java.lang.String propertyName, java.lang.Object value)
    Gets all entities of the dao type matching the value for the given propertyName.
    <R> java.util.List<R> findAllByQuery​(java.lang.Class<R> type, java.lang.String hql, java.lang.Object... params)
    Gets all entities when executing the given select query for the given type which may not be a entity type (int, long, map,...).
    java.util.List<E> findAllByQuery​(java.lang.String hql, java.lang.Object... params)
    Gets all entities when executing the given select query for the dao entity type.
    <R> java.util.List<R> findAllByQueryAndPager​(java.lang.Class<R> type, java.lang.String hql, TopiaPagerBean pager, java.lang.Object... params)
    Gets a page of entities of the given select hql query using the pager to obtain the window of entities to return.
    java.util.List<E> findAllByQueryAndPager​(java.lang.String hql, TopiaPagerBean pager, java.lang.Object... params)
    Gets a page of entities of the given select hql query using the pager to obtain the window of entities to return.
    <R> java.util.List<R> findAllByQueryWithBound​(java.lang.Class<R> type, java.lang.String hql, int startIndex, int endIndex, java.lang.Object... params)
    Gets a page of entities when executing the given select query for the dao entity type (will only return the window of startIndex - endIndex entities).
    java.util.List<E> findAllByQueryWithBound​(java.lang.String hql, int startIndex, int endIndex, java.lang.Object... params)
    Gets a page of entities when executing the given select query for the dao entity type (will only return the window of startIndex - endIndex entities).
    java.util.List<E> findAllContains​(java.lang.String propertyName, java.lang.Object property)
    Récupère toutes les entités (du type géré par ce dao) dont la collection nommée propertyName contient la property donnée.
    java.util.List<java.lang.String> findAllIds()
    Recuperation de tous les ids en base pour le type d'entite du dao.
    java.lang.Iterable<E> findAllLazyByQuery​(int batchSize, java.lang.String hql, java.lang.Object... params)
    Gets all entities in lazy mode when executing the given select query for the dao entity type.
    <R> java.lang.Iterable<R> findAllLazyByQuery​(java.lang.Class<R> type, int batchSize, java.lang.String hql, java.lang.Object... params)
    Gets all entities in lazy mode when executing the given select query for the given type which may not be a entity type (int, long, map,...).
    <R> java.lang.Iterable<R> findAllLazyByQuery​(java.lang.Class<R> type, java.lang.String hql, java.lang.Object... params)
    Gets all entities in lazy mode when executing the given select query for the given type which may not be a entity type (int, long, map,...).
    java.lang.Iterable<E> findAllLazyByQuery​(java.lang.String hql, java.lang.Object... params)
    Gets all entities in lazy mode when executing the given select query for the dao entity type.
    java.util.Map<java.lang.Class<? extends TopiaEntity>,​java.util.List<? extends TopiaEntity>> findAllUsages​(E entity)
    Find all usages of the given entity.
    java.util.List<E> findAllWithOrder​(java.lang.String... propertyNames)
    Gets all entites for the dao entity type order by given propertyNames.
    E findByPrimaryKey​(java.lang.Object... k)
    Recherche la classe en utilisant la cle naturelle, si la cle naturelle est composé de plusieurs champs alors les arguments passés doivent être dans l'ordre de declaration dans le fichier de mapping
    E findByPrimaryKey​(java.util.Map<java.lang.String,​java.lang.Object> keys)
    Recherche la classe en utilisant la cle naturelle, chaque champs de la cle naturelle est une entre de la map passe en argument.
    E findByProperties​(java.lang.String propertyName, java.lang.Object value, java.lang.Object... others)  
    E findByProperties​(java.util.Map<java.lang.String,​java.lang.Object> properties)
    Find an entity matching properties.
    E findByProperty​(java.lang.String propertyName, java.lang.Object value)
    Find an entity matching value for the given propertyName.
    <R> R findByQuery​(java.lang.Class<R> type, java.lang.String hql, java.lang.Object... params)
    Execute une requête basé sur le type donné.
    E findByQuery​(java.lang.String hql, java.lang.Object... params)
    Execute une requête basé sur l'entité du DAO.
    E findByTopiaId​(java.lang.String id)
    Find an entity corresponding to the id.
    E findContains​(java.lang.String propertyName, java.lang.Object property)
    Récupère la première entité (du type géré par ce dao) dont la collection nommée propertyName contient la property donnée.
    <R extends TopiaEntity>
    java.util.List<R>
    findUsages​(java.lang.Class<R> type, E entity)
    Find usages of the given entity in the entities of the given type.
    int getBatchSize()
    Obtains the batch size used to load data.
    TopiaContextImplementor getContext()
    Return context used by this DAO.
    java.lang.Class<E> getEntityClass()
    Get the type of entity managed by this DAO.
    TopiaEntityEnum getTopiaEntityEnum()
    Get the entityEnum of the type of entity managed by this DAO.
    void init​(TopiaContextImplementor context, java.lang.Class<E> entityClass)
    When TopiaContextImpl create the TopiaDAOHibernate, it must call this method just after.
    E newInstance()
    Create a new instance of managed entity not persisted.
    void removeTopiaEntityListener​(TopiaEntityListener listener)  
    void removeTopiaEntityVetoable​(TopiaEntityVetoable vetoable)  
    void setBatchSize​(int batchSize)
    Set a new default batch size.
    E update​(E e)
    Permet d'ajouter ou de mettre a jour un objet.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • newInstance

      E newInstance() throws TopiaException
      Create a new instance of managed entity not persisted.
      Returns:
      new entity instance
      Throws:
      TopiaException - if any pb while creating the entity
      Since:
      2.3.1
    • create

      E create​(java.lang.Object... properties) throws TopiaException
      Construit une nouvelle instance de l'objet géré par ce DAO
      Parameters:
      properties - la liste des propriétés que doit avoir l'objet créé les arguments vont par paire (propertyName, value)
      Returns:
      un nouvel objet
      Throws:
      TopiaException - si un problème est rencontré durant l'instanciation
      java.lang.IllegalArgumentException - Si le nombre on le type des arguments n'est pas bon ou que le type ou le nom d'une propriété est fausse
    • create

      E create​(java.util.Map<java.lang.String,​java.lang.Object> properties) throws TopiaException
      Construit une nouvelle instance de l'objet géré par ce DAO
      Parameters:
      properties - la liste des propriétés que doit avoir l'objet créé
      Returns:
      un nouvel objet
      Throws:
      TopiaException - si un problème est rencontré durant l'instanciation
      java.lang.IllegalArgumentException - Si le nombre on le type des arguments n'est pas bon ou que le type ou le nom d'une propriété est fausse
    • create

      E create​(E e) throws TopiaException
      Permet de sauver un object instancié sans le DAO. Utilisé notement dans le cas ou le DAO est situé derriere une couche de webservice et que l'appel à la methode create(Object...) serait trop couteux.
      Parameters:
      e - l'entité instanciée à sauver
      Returns:
      l'entité avec son topiaID valorisé
      Throws:
      TopiaException - if any pb while creating datas
      Since:
      2.3.1
    • update

      E update​(E e) throws TopiaException
      Permet d'ajouter ou de mettre a jour un objet. Cela permet d'ajouter par exemple un objet provenant d'un autre context mais du meme type de DAO.
      Parameters:
      e - l'entite a ajouter ou mettre a jour
      Returns:
      l'entity passé en paramètre.
      Throws:
      TopiaException - if any pb while updating datas
    • delete

      void delete​(E e) throws TopiaException
      Permet de supprimer une entite.
      Parameters:
      e - l'entite a supprimer
      Throws:
      TopiaException - if any pb while deleting datas
    • deleteAll

      void deleteAll​(java.lang.Iterable<E> entities) throws TopiaException
      Permet de supprimer des entités.
      Parameters:
      entities - les entités à supprimer
      Throws:
      TopiaException - if any pb while deleting datas
    • findByTopiaId

      E findByTopiaId​(java.lang.String id) throws TopiaException
      Find an entity corresponding to the id. If the id is null, nothing will be searched.
      Parameters:
      id - topiaId of the entity to found
      Returns:
      the entity found or null if not
      Throws:
      TopiaException - for Topia errors on query
    • findByProperty

      E findByProperty​(java.lang.String propertyName, java.lang.Object value) throws TopiaException
      Find an entity matching value for the given propertyName.
      Parameters:
      propertyName - property name to filter
      value - value of the property to math
      Returns:
      the first entity matching the request
      Throws:
      TopiaException
    • findByProperties

      E findByProperties​(java.lang.String propertyName, java.lang.Object value, java.lang.Object... others) throws TopiaException
      Parameters:
      propertyName - le nom de la propriété
      value - la valeur à tester
      others - les autres proprietes doivent aller par 2 propertyName, value
      Returns:
      l'entité trouvé
      Throws:
      TopiaException - if any pb while getting datas
    • findByProperties

      E findByProperties​(java.util.Map<java.lang.String,​java.lang.Object> properties) throws TopiaException
      Find an entity matching properties.
      Parameters:
      properties - les propriétés à matcher
      Returns:
      l'entité trouvé
      Throws:
      TopiaException - if any pb while getting datas
    • findByQuery

      E findByQuery​(java.lang.String hql, java.lang.Object... params) throws TopiaException
      Execute une requête basé sur l'entité du DAO. Permet de récupérer une entité correspondant à la requête.
      Parameters:
      hql - la requête hql à executer
      params - les paramètres de la requète
      Returns:
      l'entité correspondant à la recherche ou null si aucune entité n'a été trouvée
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
    • findByQuery

      <R> R findByQuery​(java.lang.Class<R> type, java.lang.String hql, java.lang.Object... params) throws TopiaException
      Execute une requête basé sur le type donné. Permet de récupérer une entité correspondant à la requête.
      Parameters:
      hql - la requête hql à executer
      params - les paramètres de la requète
      Returns:
      l'entité correspondant à la recherche ou null si aucune entité n'a été trouvée
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
    • findByPrimaryKey

      E findByPrimaryKey​(java.util.Map<java.lang.String,​java.lang.Object> keys) throws TopiaException
      Recherche la classe en utilisant la cle naturelle, chaque champs de la cle naturelle est une entre de la map passe en argument.
      Parameters:
      keys - la liste des champs de la cle naturelle avec leur valeur
      Returns:
      l'entite trouvé
      Throws:
      TopiaException - if any pb while getting datas
    • findByPrimaryKey

      E findByPrimaryKey​(java.lang.Object... k) throws TopiaException
      Recherche la classe en utilisant la cle naturelle, si la cle naturelle est composé de plusieurs champs alors les arguments passés doivent être dans l'ordre de declaration dans le fichier de mapping
      Parameters:
      k - l'objet cle naturelle de la classe
      Returns:
      l'entité trouvé
      Throws:
      TopiaException - if any pb while getting datas
    • findContains

      E findContains​(java.lang.String propertyName, java.lang.Object property) throws TopiaException
      Récupère la première entité (du type géré par ce dao) dont la collection nommée propertyName contient la property donnée.
      Parameters:
      propertyName - le nom de la propriété
      property - la propriété recherchée
      Returns:
      la première entité recherchée
      Throws:
      TopiaException - pour tout erreur lors de la recherche
      Since:
      2.5.4
    • findAll

      java.util.List<E> findAll() throws TopiaException
      Gets all entitys of the dao type in db.
      Returns:
      all entities of the dao type in db
      Throws:
      TopiaException
    • findAllIds

      java.util.List<java.lang.String> findAllIds() throws TopiaException
      Recuperation de tous les ids en base pour le type d'entite du dao.
      Returns:
      la liste de tous les ids
      Throws:
      TopiaException - si pb en base
    • findAllByProperty

      java.util.List<E> findAllByProperty​(java.lang.String propertyName, java.lang.Object value) throws TopiaException
      Gets all entities of the dao type matching the value for the given propertyName.
      Parameters:
      propertyName - property name to filter
      value - value to match
      Returns:
      matching entities
      Throws:
      TopiaException - if any pb while getting datas
    • findAllByProperties

      java.util.List<E> findAllByProperties​(java.lang.String propertyName, java.lang.Object value, java.lang.Object... others) throws TopiaException
      Gets all entities of the dao type matching the value for the given propertyName and others.
      Parameters:
      propertyName - le nom de la propriété
      value - la valeur à tester
      others - les autres proprietes doivent aller par 2 propertyName, value
      Returns:
      matching entities
      Throws:
      TopiaException - if any pb while getting datas
    • findAllByProperties

      java.util.List<E> findAllByProperties​(java.util.Map<java.lang.String,​java.lang.Object> properties) throws TopiaException
      Gets all entities of the dao type matching all the properties.
      Parameters:
      properties - properties to match
      Returns:
      matching entities
      Throws:
      TopiaException - if any pb while getting datas
    • findAllByQuery

      java.util.List<E> findAllByQuery​(java.lang.String hql, java.lang.Object... params) throws TopiaException
      Gets all entities when executing the given select query for the dao entity type.
      Parameters:
      hql - hql query
      params - query params
      Returns:
      entites of the query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
    • findAllByQuery

      <R> java.util.List<R> findAllByQuery​(java.lang.Class<R> type, java.lang.String hql, java.lang.Object... params) throws TopiaException
      Gets all entities when executing the given select query for the given type which may not be a entity type (int, long, map,...).
      Parameters:
      hql - hql query
      params - query params
      Returns:
      entites of the query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
    • findAllLazyByQuery

      java.lang.Iterable<E> findAllLazyByQuery​(java.lang.String hql, java.lang.Object... params) throws TopiaException
      Gets all entities in lazy mode when executing the given select query for the dao entity type. Important note:
      Parameters:
      hql - hql query
      params - query params
      Returns:
      entites of the query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.14
    • findAllLazyByQuery

      <R> java.lang.Iterable<R> findAllLazyByQuery​(java.lang.Class<R> type, java.lang.String hql, java.lang.Object... params) throws TopiaException
      Gets all entities in lazy mode when executing the given select query for the given type which may not be a entity type (int, long, map,...). Important note:
      Parameters:
      type - type of data to return
      hql - hql query
      params - query params
      Returns:
      entites of the query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.14
    • findAllLazyByQuery

      java.lang.Iterable<E> findAllLazyByQuery​(int batchSize, java.lang.String hql, java.lang.Object... params) throws TopiaException
      Gets all entities in lazy mode when executing the given select query for the dao entity type. Important note:
      Parameters:
      batchSize - batch size
      hql - hql query
      params - query params
      Returns:
      entites of the query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.14
    • findAllLazyByQuery

      <R> java.lang.Iterable<R> findAllLazyByQuery​(java.lang.Class<R> type, int batchSize, java.lang.String hql, java.lang.Object... params) throws TopiaException
      Gets all entities in lazy mode when executing the given select query for the given type which may not be a entity type (int, long, map,...). Important note:
      Parameters:
      type - type of data to return
      batchSize - batch size
      hql - hql query
      params - query params
      Returns:
      entites of the query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.14
    • findAllByQueryWithBound

      <R> java.util.List<R> findAllByQueryWithBound​(java.lang.Class<R> type, java.lang.String hql, int startIndex, int endIndex, java.lang.Object... params) throws TopiaException
      Gets a page of entities when executing the given select query for the dao entity type (will only return the window of startIndex - endIndex entities).
      Parameters:
      hql - hql query to execute
      startIndex - first index of entity to return
      endIndex - last index of entity to return
      params - query params
      Returns:
      entites of the paginated query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
    • findAllByQueryWithBound

      java.util.List<E> findAllByQueryWithBound​(java.lang.String hql, int startIndex, int endIndex, java.lang.Object... params) throws TopiaException
      Gets a page of entities when executing the given select query for the dao entity type (will only return the window of startIndex - endIndex entities).
      Parameters:
      hql - hql query to execute
      startIndex - first index of entity to return
      endIndex - last index of entity to return
      params - query params
      Returns:
      entites of the paginated query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
    • findAllByQueryAndPager

      <R> java.util.List<R> findAllByQueryAndPager​(java.lang.Class<R> type, java.lang.String hql, TopiaPagerBean pager, java.lang.Object... params) throws TopiaException
      Gets a page of entities of the given select hql query using the pager to obtain the window of entities to return.
      Parameters:
      type - type of data to return
      hql - hql query to execute
      pager - pager to obtan the correct window of data
      params - params of the query
      Returns:
      entities of the paginated query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
      See Also:
      TopiaPagerBean
    • findAllByQueryAndPager

      java.util.List<E> findAllByQueryAndPager​(java.lang.String hql, TopiaPagerBean pager, java.lang.Object... params) throws TopiaException
      Gets a page of entities of the given select hql query using the pager to obtain the window of entities to return.
      Parameters:
      hql - hql query to execute
      pager - pager to obtan the correct window of data
      params - params of the query
      Returns:
      entities of the paginated query result
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
      See Also:
      TopiaPagerBean
    • findAllWithOrder

      java.util.List<E> findAllWithOrder​(java.lang.String... propertyNames) throws TopiaException
      Gets all entites for the dao entity type order by given propertyNames. You can add on each property ASC ou DESC to fix order way (by default is ASC).
      Parameters:
      propertyNames - property names of order to apply
      Returns:
      all entities of the dao entity type with given order
      Throws:
      TopiaException - if any pb while getting datas
    • findAllContains

      java.util.List<E> findAllContains​(java.lang.String propertyName, java.lang.Object property) throws TopiaException
      Récupère toutes les entités (du type géré par ce dao) dont la collection nommée propertyName contient la property donnée.
      Parameters:
      propertyName - le nom de la propriété
      property - la propriété recherchée
      Returns:
      toutes les entités recherchées
      Throws:
      TopiaException - pour tout erreur lors de la recherche
      Since:
      2.5.4
    • existByTopiaId

      boolean existByTopiaId​(java.lang.String id) throws TopiaException
      Check the existence of an entity with technical id.
      Parameters:
      id - unique id of the entity to test existence.
      Returns:
      true if entity exists, false otherwise
      Throws:
      TopiaException - for Topia errors
      Since:
      2.3.4
    • existByProperties

      boolean existByProperties​(java.lang.String propertyName, java.lang.Object propertyValue, java.lang.Object... others) throws TopiaException
      Check the existence of an entity with propertyName with propertyValue. others properties can be added to test existence.
      Parameters:
      propertyName - first property name to test existence
      propertyValue - first property value to test existence
      others - altern propertyName and propertyValue
      Returns:
      true if entity exists, false otherwise
      Throws:
      TopiaException - for Topia errors
      Since:
      2.3.4
    • existsByQuery

      boolean existsByQuery​(java.lang.String hql, java.lang.Object... params) throws TopiaException
      Check the existence of an entity using a hql query.
      Parameters:
      hql - query used to test existence
      params - params used by the query
      Returns:
      true if entity exists, false otherwise
      Throws:
      TopiaException
      Since:
      2.6.12
    • count

      long count() throws TopiaException
      Count the number of existing entities.
      Returns:
      number of total entities
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.3.4
    • countByQuery

      long countByQuery​(java.lang.String hql, java.lang.Object... params) throws TopiaException
      Count the number of entities based on a hql.
      Parameters:
      hql - hql query to use
      Returns:
      number of entities filtered by the query
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
    • findUsages

      <R extends TopiaEntity> java.util.List<R> findUsages​(java.lang.Class<R> type, E entity) throws TopiaException
      Find usages of the given entity in the entities of the given type.
      Type Parameters:
      R - type of entity to search
      Parameters:
      type - the type of entity to search
      entity - the entity on which search is done
      Returns:
      the list of entities of the given type which uses the given entity
      Throws:
      TopiaException - if any problem while getting data
      Since:
      2.3.0
    • findAllUsages

      java.util.Map<java.lang.Class<? extends TopiaEntity>,​java.util.List<? extends TopiaEntity>> findAllUsages​(E entity) throws TopiaException
      Find all usages of the given entity.
      Parameters:
      entity - the entity
      Returns:
      the dictionnary of usages of the given entities (keys are entity usage container, values are the list of this type of entity to use the given entity).
      Throws:
      TopiaException - if any pb while getting data
      Since:
      2.3.0
    • computeAndAddRecordsToPager

      void computeAndAddRecordsToPager​(java.lang.String hql, TopiaPagerBean pager, java.lang.Object... params) throws TopiaException
      Execute the count hql query and then synch the pager to this result (says fill the PagerBean.getRecords() field and then adapt the number of pages available and the current number page).
      Parameters:
      hql - the count hql to execute
      pager - the page to synch
      params - params of the count query
      Throws:
      TopiaException - if any pb while getting datas
      Since:
      2.6.12
      See Also:
      TopiaPagerBean
    • getTopiaEntityEnum

      TopiaEntityEnum getTopiaEntityEnum()
      Get the entityEnum of the type of entity managed by this DAO.
      Returns:
      entity type enum managed by this DAO
    • getEntityClass

      java.lang.Class<E> getEntityClass()
      Get the type of entity managed by this DAO.
      Returns:
      entity type managed by this DAO
    • getBatchSize

      int getBatchSize()
      Obtains the batch size used to load data. Default value if 1000.
      Returns:
      the batch size.
      Since:
      2.6.14
    • setBatchSize

      void setBatchSize​(int batchSize)
      Set a new default batch size.
      Parameters:
      batchSize - new batch size to use when iterating.
      Since:
      2.6.14
    • init

      void init​(TopiaContextImplementor context, java.lang.Class<E> entityClass) throws TopiaException
      When TopiaContextImpl create the TopiaDAOHibernate, it must call this method just after.
      Parameters:
      context - context
      entityClass - entity class
      Throws:
      TopiaException - if any pb while init
    • getContext

      Return context used by this DAO.
      Returns:
      the context.
    • createSimpleQuery

      java.lang.String createSimpleQuery​(java.lang.String alias)
      Create the simple hql query for the entity managed by the dao. A optional alias can be passed:
      FROM MyEntityImpl myAlias
      Parameters:
      alias - optional alias to use in query
      Returns:
      the hql query
      Since:
      2.6.14
    • addTopiaEntityListener

      void addTopiaEntityListener​(TopiaEntityListener listener)
    • addTopiaEntityVetoable

      void addTopiaEntityVetoable​(TopiaEntityVetoable vetoable)
    • removeTopiaEntityListener

      void removeTopiaEntityListener​(TopiaEntityListener listener)
    • removeTopiaEntityVetoable

      void removeTopiaEntityVetoable​(TopiaEntityVetoable vetoable)