All Superinterfaces:
BaseDao<Unit>
All Known Implementing Classes:
UnitDaoImpl

@Repository public interface UnitDao extends BaseDao<Unit>
See Also:
  • Method Details

    • find

      Unit find(Unit unit)
      Description copied from interface: BaseDao
      Does a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property).
      Specified by:
      find in interface BaseDao<Unit>
      Parameters:
      unit - the entity to look for.
      Returns:
      an entity that was found in the persistent storage, or null if no such entity was found.
    • findOrCreate

      Unit findOrCreate(Unit unit)
      Description copied from interface: BaseDao
      Calls the find method, and if this method returns null, creates a new instance in the persistent storage.
      Specified by:
      findOrCreate in interface BaseDao<Unit>
      Parameters:
      unit - the entity to look for and persist if not found.
      Returns:
      the given entity, guaranteed to be representing an entity present in the persistent storage.