is.idega.idegaweb.golf.entity
Class UnionHomeImpl

java.lang.Object
  extended by com.idega.data.IDOFactory
      extended by is.idega.idegaweb.golf.entity.UnionHomeImpl
All Implemented Interfaces:
com.idega.data.IDOHome, UnionHome, java.io.Serializable, javax.ejb.EJBLocalHome

public class UnionHomeImpl
extends com.idega.data.IDOFactory
implements UnionHome

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.idega.data.IDOFactory
dataSource
 
Constructor Summary
UnionHomeImpl()
           
 
Method Summary
 Union create()
           
 Union createLegacy()
           
 java.util.Collection<Union> findAll()
           
 java.util.Collection<Union> findAll(java.lang.String unionType)
           
 java.util.Collection findAllByArea(UnionArea area)
           
 java.util.Collection<Union> findAllChildUnions(java.util.Collection<java.lang.String> parentUnionsIds)
           
 java.util.Collection<Union> findAllGolfClubs()
           
 java.util.Collection findAllUnions()
           
 java.util.Map<Union,java.util.Collection<Member>> findBlackListedMembers()
           
 java.util.Map<Union,java.util.Collection<Member>> findBlackListedMembers(java.util.Collection<java.lang.String> unionIds)
           
 java.util.Map<Union,java.util.Collection<Member>> findBlackListedMembersByUnions(java.util.Collection<Union> unions)
           
 Union findByAbbreviation(java.lang.String abbr)
           
 Union findByPrimaryKey(int id)
           
 Union findByPrimaryKey(java.lang.Object pk)
           
 Union findByPrimaryKeyLegacy(int id)
           
 java.util.Collection<Union> findByPrimaryKeys(java.util.Collection<?> primaryKeys)
           
 Union findUnionByIWMemberSystemGroup(com.idega.user.data.Group union)
           
 Union getByUId(java.lang.String UId)
           
 java.lang.Class getEntityInterfaceClass()
           
protected  MemberHome getMemberHome()
           
 java.util.Collection<Union> getUnions(int start, int maxResults)
           
 java.util.Collection<Union> getUnionsByMembershipAndMember(int memberId, java.lang.String membershipType)
           
 java.util.Collection<Union> getUnionsWithoutUId(int start, int maxResults)
           
 boolean isBlacklisted(java.lang.String memberId)
          Checks if Member is in blacklist.
 boolean removeFromBlacklist(java.lang.String unionId, java.lang.String personalId)
          Removes entry from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST
 boolean removeFromBlackList(java.lang.String unionId, java.lang.String memberId)
          Removes entry from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST
 boolean removeFromBlackList(Union union, Member member)
          Removes entry from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST
 boolean updateBlackList(java.lang.String unionId, java.lang.String personalId)
          Adds entry to blacklist of Unions
 boolean updateBlackList(Union union, Member member)
          Adds entry to blacklist of Unions
 
Methods inherited from class com.idega.data.IDOFactory
createEntity, createIDO, decode, decode, findByPrimaryKeyCollection, findByPrimaryKeyIDO, findByPrimaryKeyIDO, findSubTypeByPrimaryKeyIDO, findSubTypesByPrimaryKeysIDO, getDatasource, getEntityBeanClass, getEntityCollectionForPrimaryKeys, getEntitySetForPrimaryKeys, getHomesForSubtypes, getHomesForSubtypes, idoCheckInPooledEntity, idoCheckOutPooledEntity, idoCreate, idoCreate, idoFindByPrimaryKey, idoFindByPrimaryKey, idoFindByPrimaryKey, idoFindByPrimaryKey, idoFindByPrimaryKey, idoFindByPrimaryKey, remove, setDatasource, setDatasource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.idega.data.IDOHome
createIDO, decode, decode, findByPrimaryKeyCollection, findByPrimaryKeyIDO, getDatasource, getEntityCollectionForPrimaryKeys, setDatasource, setDatasource
 
Methods inherited from interface javax.ejb.EJBLocalHome
remove
 

Constructor Detail

UnionHomeImpl

public UnionHomeImpl()
Method Detail

getEntityInterfaceClass

public java.lang.Class getEntityInterfaceClass()
Specified by:
getEntityInterfaceClass in class com.idega.data.IDOFactory

create

public Union create()
             throws javax.ejb.CreateException
Specified by:
create in interface UnionHome
Throws:
javax.ejb.CreateException

findByPrimaryKey

public Union findByPrimaryKey(java.lang.Object pk)
Specified by:
findByPrimaryKey in interface UnionHome
Parameters:
pk - is EJBLocalObject.getPrimaryKey(), not null;
Returns:
entity by id or null on failure;

createLegacy

public Union createLegacy()
Specified by:
createLegacy in interface UnionHome

findByPrimaryKey

public Union findByPrimaryKey(int id)
                       throws javax.ejb.FinderException
Specified by:
findByPrimaryKey in interface UnionHome
Throws:
javax.ejb.FinderException

findByPrimaryKeyLegacy

public Union findByPrimaryKeyLegacy(int id)
                             throws java.sql.SQLException
Specified by:
findByPrimaryKeyLegacy in interface UnionHome
Throws:
java.sql.SQLException

findAll

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

findAllGolfClubs

public java.util.Collection<Union> findAllGolfClubs()
Specified by:
findAllGolfClubs in interface UnionHome
Returns:
all entities in data source where Union.getUnionType() is "golf_club" or Collections.emptyList() on failure;

findAll

public java.util.Collection<Union> findAll(java.lang.String unionType)
Specified by:
findAll in interface UnionHome
Parameters:
unionType - is Union.getUnionType(), skipped if null;
Returns:
all entities in data source by criteria or Collections.emptyList() on failure;

findBlackListedMembers

public java.util.Map<Union,java.util.Collection<Member>> findBlackListedMembers(java.util.Collection<java.lang.String> unionIds)
Specified by:
findBlackListedMembers in interface UnionHome
Parameters:
unionIds - is Collection of EJBLocalObject.getPrimaryKey(), skipped if null;
Returns:
pairs from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST or Collections.emptyMap() on failure;

findBlackListedMembersByUnions

public java.util.Map<Union,java.util.Collection<Member>> findBlackListedMembersByUnions(java.util.Collection<Union> unions)
Specified by:
findBlackListedMembersByUnions in interface UnionHome
Parameters:
unions - is Collection of Union, skipped if null;
Returns:
pairs from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST or Collections.emptyMap() on failure;

findBlackListedMembers

public java.util.Map<Union,java.util.Collection<Member>> findBlackListedMembers()
Specified by:
findBlackListedMembers in interface UnionHome
Returns:
pairs from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST or Collections.emptyMap() on failure;

findAllUnions

public java.util.Collection findAllUnions()
                                   throws javax.ejb.FinderException
Specified by:
findAllUnions in interface UnionHome
Throws:
javax.ejb.FinderException

findAllByArea

public java.util.Collection findAllByArea(UnionArea area)
                                   throws javax.ejb.FinderException
Specified by:
findAllByArea in interface UnionHome
Throws:
javax.ejb.FinderException

findUnionByIWMemberSystemGroup

public Union findUnionByIWMemberSystemGroup(com.idega.user.data.Group union)
                                     throws javax.ejb.FinderException
Specified by:
findUnionByIWMemberSystemGroup in interface UnionHome
Throws:
javax.ejb.FinderException

findByAbbreviation

public Union findByAbbreviation(java.lang.String abbr)
                         throws javax.ejb.FinderException
Specified by:
findByAbbreviation in interface UnionHome
Throws:
javax.ejb.FinderException

findByPrimaryKeys

public java.util.Collection<Union> findByPrimaryKeys(java.util.Collection<?> primaryKeys)
Specified by:
findByPrimaryKeys in interface UnionHome
Parameters:
primaryKeys - is Collection of EJBLocalObject.getPrimaryKey(), not null
Returns:
entities by criteria or Collections.emptyList() on failure;

findAllChildUnions

public java.util.Collection<Union> findAllChildUnions(java.util.Collection<java.lang.String> parentUnionsIds)
Specified by:
findAllChildUnions in interface UnionHome
Parameters:
parentUnionsIds - is Collection of EJBLocalObject.getPrimaryKey() to get child Unions for, not null;
Returns:
child Unions of given Union or Collections.emptyList() on failure;

updateBlackList

public boolean updateBlackList(java.lang.String unionId,
                               java.lang.String personalId)
Description copied from interface: UnionHome

Adds entry to blacklist of Unions

Specified by:
updateBlackList in interface UnionHome
Parameters:
unionId - is EJBLocalObject.getPrimaryKey() to add to, not null;
personalId - is Member.getSocialSecurityNumber(), not null;
Returns:
true on update, false otherwise;

updateBlackList

public boolean updateBlackList(Union union,
                               Member member)
Description copied from interface: UnionHome

Adds entry to blacklist of Unions

Specified by:
updateBlackList in interface UnionHome
Parameters:
union - to add Member to, not null;
member - to add, not null;
Returns:
true on update, false otherwise;

removeFromBlackList

public boolean removeFromBlackList(java.lang.String unionId,
                                   java.lang.String memberId)
Description copied from interface: UnionHome

Removes entry from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST

Specified by:
removeFromBlackList in interface UnionHome
Parameters:
unionId - is EJBLocalObject.getPrimaryKey() to remove from, not null;
memberId - is EJBLocalObject.getPrimaryKey() of Member to remove, not null;
Returns:
true if removed, false otherwise;

removeFromBlacklist

public boolean removeFromBlacklist(java.lang.String unionId,
                                   java.lang.String personalId)
Description copied from interface: UnionHome

Removes entry from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST

Specified by:
removeFromBlacklist in interface UnionHome
Parameters:
unionId - is EJBLocalObject.getPrimaryKey() to remove from, not null;
Returns:
true if removed, false otherwise;

removeFromBlackList

public boolean removeFromBlackList(Union union,
                                   Member member)
Description copied from interface: UnionHome

Removes entry from UnionBMPBean.TABLE_NAME_UNION_BLACKLIST

Specified by:
removeFromBlackList in interface UnionHome
Parameters:
union - to remove from, not null;
member - to remove, not null;
Returns:
true if removed, false otherwise;

isBlacklisted

public boolean isBlacklisted(java.lang.String memberId)
Description copied from interface: UnionHome

Checks if Member is in blacklist.

Specified by:
isBlacklisted in interface UnionHome
Parameters:
memberId - is EJBLocalObject.getPrimaryKey() to check, not null;
Returns:
true if Member in blacklist, false otherwise;

getMemberHome

protected MemberHome getMemberHome()

getUnionsByMembershipAndMember

public java.util.Collection<Union> getUnionsByMembershipAndMember(int memberId,
                                                                  java.lang.String membershipType)
Specified by:
getUnionsByMembershipAndMember in interface UnionHome

getUnionsWithoutUId

public java.util.Collection<Union> getUnionsWithoutUId(int start,
                                                       int maxResults)
Specified by:
getUnionsWithoutUId in interface UnionHome

getUnions

public java.util.Collection<Union> getUnions(int start,
                                             int maxResults)
Specified by:
getUnions in interface UnionHome

getByUId

public Union getByUId(java.lang.String UId)
Specified by:
getByUId in interface UnionHome


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