is.idega.idegaweb.golf.data.dao.impl
Class WarningMessageEntityDaoImpl

java.lang.Object
  extended by com.idega.core.persistence.impl.GenericDaoImpl
      extended by is.idega.idegaweb.golf.data.dao.impl.WarningMessageEntityDaoImpl
All Implemented Interfaces:
com.idega.core.persistence.GenericDao, WarningMessageEntityDao

@Repository(value="warningMessageEntityDao")
@Transactional(readOnly=false)
@Scope(value="singleton")
public class WarningMessageEntityDaoImpl
extends com.idega.core.persistence.impl.GenericDaoImpl
implements WarningMessageEntityDao

Implementation for WarningMessageEntityDao

You can report about problems to: Martynas StakÄ—

Version:
1.0.0 Apr 11, 2014
Author:
Martynas StakÄ—

Field Summary
 
Fields inherited from interface is.idega.idegaweb.golf.data.dao.WarningMessageEntityDao
BEAN_NAME
 
Constructor Summary
WarningMessageEntityDaoImpl()
           
 
Method Summary
 WarningMessageEntity find(java.lang.Long severty, java.lang.Long unionId)
           
 WarningMessageEntity find(java.lang.Long severty, java.lang.String unionId)
           
 java.util.List<WarningMessageEntity> findAll()
           
 java.util.List<WarningMessageEntity> findAll(java.lang.Long unionId)
           
 WarningMessageEntity findById(java.lang.Long id)
           
 WarningMessageEntity getWarningMessageWithGreatestSeverity(Union union)
           
 void remove(java.lang.Long id)
          Removes entity from data source
 WarningMessageEntity update(java.lang.Long id, java.lang.String message, java.lang.Long severty, java.lang.Long unionId)
          Updates or creates entity in data source;
 WarningMessageEntity update(java.lang.Long id, java.lang.String message, java.lang.Long severty, java.lang.String unionId)
          Updates or creates entity in data source;
 WarningMessageEntity update(WarningMessageEntity entity)
          Updates or creates entity in data source;
 
Methods inherited from class com.idega.core.persistence.impl.GenericDaoImpl
contains, createNamedQuery, createNewQueryInline, createNewQueryNamed, createNewQueryNativeInline, find, flush, getDaoFunctions, getEntityManager, getLogger, getQueryInline, getQueryNamed, getQueryNativeInline, getReference, getResultList, getResultListByInlineQuery, getSingleResult, getSingleResultByInlineQuery, merge, mergeRemove, persist, refresh, remove, setEntityManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.idega.core.persistence.GenericDao
contains, createNamedQuery, find, flush, getQueryInline, getQueryNamed, getQueryNativeInline, getReference, getResultList, getResultListByInlineQuery, getSingleResult, getSingleResultByInlineQuery, merge, mergeRemove, persist, refresh, remove
 

Constructor Detail

WarningMessageEntityDaoImpl

public WarningMessageEntityDaoImpl()
Method Detail

update

public WarningMessageEntity update(WarningMessageEntity entity)
Description copied from interface: WarningMessageEntityDao

Updates or creates entity in data source;

Specified by:
update in interface WarningMessageEntityDao
Parameters:
entity - to create or update, not null;
Returns:
update or created entity or null on failure;

update

public WarningMessageEntity update(java.lang.Long id,
                                   java.lang.String message,
                                   java.lang.Long severty,
                                   java.lang.String unionId)
Description copied from interface: WarningMessageEntityDao

Updates or creates entity in data source;

Specified by:
update in interface WarningMessageEntityDao
Parameters:
id - is WarningMessageEntity.getId(), new entity is created if null;
message - is WarningMessageEntity.getMessage(), skipped if null;
severty - is WarningMessageEntity.getSeverity() is number of message importance, not null;
unionId - is EJBLocalObject.getPrimaryKey() of Union this message is intended for, not null;
Returns:
update or created entity or null on failure;

update

public WarningMessageEntity update(java.lang.Long id,
                                   java.lang.String message,
                                   java.lang.Long severty,
                                   java.lang.Long unionId)
Description copied from interface: WarningMessageEntityDao

Updates or creates entity in data source;

Specified by:
update in interface WarningMessageEntityDao
Parameters:
id - is WarningMessageEntity.getId(), new entity is created if null;
message - is WarningMessageEntity.getMessage(), skipped if null;
severty - is WarningMessageEntity.getSeverity() is number of message importance, not null;
unionId - is EJBLocalObject.getPrimaryKey() of Union this message is intended for, not null;
Returns:
update or created entity or null on failure;

findById

public WarningMessageEntity findById(java.lang.Long id)
Specified by:
findById in interface WarningMessageEntityDao
Parameters:
id - is WarningMessageEntity.getId() to search by, not null;
Returns:
entity by id or null on failure;

findAll

public java.util.List<WarningMessageEntity> findAll()
Specified by:
findAll in interface WarningMessageEntityDao
Returns:
all entities in data source or Collections.emptyList() on failure;

findAll

public java.util.List<WarningMessageEntity> findAll(java.lang.Long unionId)
Specified by:
findAll in interface WarningMessageEntityDao
Parameters:
unionId - is EJBLocalObject.getPrimaryKey() to search by, not null;
Returns:
entities by criteria or Collections.emptyList() on failure;

find

public WarningMessageEntity find(java.lang.Long severty,
                                 java.lang.String unionId)
Specified by:
find in interface WarningMessageEntityDao
Parameters:
severty - is WarningMessageEntity.getSeverity() or it is importance of the WarningMessageEntity, not null;
unionId - is EJBLocalObject.getPrimaryKey() to which WarningMessageEntity is connected;
Returns:
unique WarningMessageEntity or null on failure;

find

public WarningMessageEntity find(java.lang.Long severty,
                                 java.lang.Long unionId)
Specified by:
find in interface WarningMessageEntityDao
Parameters:
severty - is WarningMessageEntity.getSeverity() or it is importance of the WarningMessageEntity, not null;
unionId - is EJBLocalObject.getPrimaryKey() to which WarningMessageEntity is connected;
Returns:
unique WarningMessageEntity or null on failure;

remove

public void remove(java.lang.Long id)
Description copied from interface: WarningMessageEntityDao

Removes entity from data source

Specified by:
remove in interface WarningMessageEntityDao
Parameters:
id - to remove entity by, not null;

getWarningMessageWithGreatestSeverity

public WarningMessageEntity getWarningMessageWithGreatestSeverity(Union union)
Specified by:
getWarningMessageWithGreatestSeverity in interface WarningMessageEntityDao
Parameters:
union - to get all WarningMessageEntitys for, not null;
Returns:
WarningMessageEntity with greatest WarningMessageEntity.getSeverity() or null on failure;


Copyright © 2000-2014 idega software. All Rights Reserved.