is.idega.idegaweb.golf.handicap.business
Class HandicapServiceBean
java.lang.Object
com.idega.business.IBOServiceBean
is.idega.idegaweb.golf.handicap.business.HandicapServiceBean
- All Implemented Interfaces:
- com.idega.business.IBOService, HandicapService, java.io.Serializable, java.rmi.Remote, javax.ejb.EJBObject, javax.ejb.EnterpriseBean, javax.ejb.SessionBean
public class HandicapServiceBean
- extends com.idega.business.IBOServiceBean
- implements HandicapService
Last modified: $Date: 2009/03/17 14:56:55 $ by $Author: laddi $
- Version:
- $Revision: 1.15 $
- Author:
- laddi
- See Also:
- Serialized Form
Method Summary |
java.util.Collection<Field> |
getChildFields(Field field)
|
float |
getCourseRating(Field field,
TeeColor teeColor)
|
Field |
getField(java.lang.Object fieldPK)
|
Field |
getField(Union union)
|
java.util.Collection |
getFields()
|
java.util.Collection |
getFields(Union union)
|
java.util.Collection |
getFields(Union union,
boolean showChildFields)
|
java.util.Collection<Field> |
getFieldsPlayed(Member member)
|
float |
getHandicap(Member member)
|
float |
getHandicapBeforeDate(Member member,
java.sql.Date date)
|
float |
getHandicapDWR(float handicapBefore,
int totalPoints,
int numberOfHoles)
|
int |
getHandicapGroup(float handicap)
|
int |
getHandicapGroupLowerGrayValue(int group)
|
int |
getLength(Field field,
TeeColor teeColor)
|
protected Member |
getMemberBySSN(java.lang.String ssn)
|
protected MemberHome |
getMemberHome()
|
int |
getPar(Field field,
TeeColor teeColor)
|
int |
getPointsDWR(int courseHandicap,
int par,
int holeHandicap,
int strokes)
|
int |
getPointsForPar(int holeHandicap,
int holePar,
int courseHandicap)
|
int |
getRealPoints(Scorecard scorecard,
float handicapBefore)
|
int |
getRealPoints(Scorecard scorecard,
Scorecard previousScorecard)
|
protected ScorecardBusiness |
getScoreCardBusiness()
|
java.util.Collection<Scorecard> |
getScorecards(Member member,
java.sql.Date fromDate,
java.sql.Date toDate)
|
int |
getSlope(Field field,
TeeColor teeColor)
|
TeeColor |
getTeeColor(java.lang.Object teeColorPK)
|
TeeColor |
getTeeColor(java.lang.String memberId)
|
java.util.Map |
getTeeColorDWR(int fieldID,
java.lang.String gender)
|
protected TeeColorHome |
getTeeColorHome()
|
java.lang.String |
getTeeColorId(java.lang.String memberId)
|
java.lang.String |
getTeeColorIdByPersonalId(java.lang.String memberId)
|
java.util.Collection<java.lang.String> |
getTeeColorIds(java.lang.String fieldPrimaryKey,
java.lang.String gender)
|
java.util.Collection<java.lang.String> |
getTeeColorIdsByMemberSSN(java.lang.String fieldPrimaryKey,
java.lang.String memberSSN)
|
java.lang.String |
getTeeColorName(TeeColor teeColor)
|
java.lang.String |
getTeeColorRGB(TeeColor teeColor)
|
java.util.Collection<TeeColor> |
getTeeColors(Field field,
java.lang.String gender)
|
java.util.Collection<TeeColor> |
getTeeColors(java.lang.String fieldPrimaryKey,
java.lang.String gender)
|
java.util.Collection |
getTees(Field field,
TeeColor teeColor,
int startHole,
int endHole)
|
java.util.Collection<TeeColor> |
getTeesPlayed(Member member)
|
boolean |
hasLegitimateHandicap(int memberID,
java.sql.Date date)
|
boolean |
hasLegitimateHandicap(Member member,
java.sql.Date date)
|
void |
storeFirstHandicap(Member member,
float handicap)
|
void |
storeHandicapCorrection(Member member,
java.sql.Timestamp timestamp,
float handicap)
|
void |
storeHandicapCorrection(Member member,
java.sql.Timestamp timestamp,
float handicap,
boolean yearlyUpdate)
|
void |
updateAllHandicaps()
|
void |
updateAllHandicaps(com.idega.util.IWTimestamp fromDate)
|
Methods inherited from class com.idega.business.IBOServiceBean |
addActionListener, debug, ejbActivate, ejbCreate, ejbCreateIBO, ejbHomeCreateIBO, ejbHomeIboCreate, ejbPassivate, ejbPostCreate, ejbPostCreateIBO, ejbRemove, getAccessController, getBundle, getBundleIdentifier, getCurrentUser, getDebugLogLevel, getDefaultLogLevel, getEJBHome, getEJBObject, getErrorLogLevel, getHandle, getIDOHome, getIWApplicationContext, getIWMainApplication, getLocalizedServiceDescription, getLogger, getPrimaryKey, getServiceDescription, getServiceInstance, getSessionContext, getSessionInstance, initializeBean, isIdentical, log, log, log, log, logConfig, logDebug, logError, logSevere, logWarning, remove, setIWApplicationContext, setSessionContext, triggerActionEvent, triggerActionEvent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.idega.business.IBOService |
addActionListener, getIWApplicationContext, getLocalizedServiceDescription, getServiceDescription, initializeBean |
Methods inherited from interface javax.ejb.EJBObject |
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
HandicapServiceBean
public HandicapServiceBean()
updateAllHandicaps
public void updateAllHandicaps()
- Specified by:
updateAllHandicaps
in interface HandicapService
- See Also:
updateAllHandicaps()
updateAllHandicaps
public void updateAllHandicaps(com.idega.util.IWTimestamp fromDate)
- Specified by:
updateAllHandicaps
in interface HandicapService
- See Also:
updateAllHandicaps()
getScorecards
public java.util.Collection<Scorecard> getScorecards(Member member,
java.sql.Date fromDate,
java.sql.Date toDate)
- Specified by:
getScorecards
in interface HandicapService
- Returns:
- entities by criteria or
Collections.emptyList()
on failure;
getFields
public java.util.Collection getFields()
- Specified by:
getFields
in interface HandicapService
- See Also:
getFields()
getChildFields
public java.util.Collection<Field> getChildFields(Field field)
- Specified by:
getChildFields
in interface HandicapService
- See Also:
getChildFields(is.idega.idegaweb.golf.entity.Field)
getFields
public java.util.Collection getFields(Union union)
- Specified by:
getFields
in interface HandicapService
- See Also:
getFields()
getFields
public java.util.Collection getFields(Union union,
boolean showChildFields)
- Specified by:
getFields
in interface HandicapService
- See Also:
getFields()
getField
public Field getField(Union union)
- Specified by:
getField
in interface HandicapService
- See Also:
getField(is.idega.idegaweb.golf.entity.Union)
getField
public Field getField(java.lang.Object fieldPK)
- Specified by:
getField
in interface HandicapService
- See Also:
getField(is.idega.idegaweb.golf.entity.Union)
getTeeColors
public java.util.Collection<TeeColor> getTeeColors(Field field,
java.lang.String gender)
- Specified by:
getTeeColors
in interface HandicapService
- Parameters:
field
- to search by, not null
;gender
- is one of 'M', 'F' or 'B', skipped if null
;
- Returns:
- entities by criteria or
Collections.emptyList()
on failure;
getTeeColors
public java.util.Collection<TeeColor> getTeeColors(java.lang.String fieldPrimaryKey,
java.lang.String gender)
- Specified by:
getTeeColors
in interface HandicapService
- Parameters:
fieldPrimaryKey
- is EJBLocalObject.getPrimaryKey()
to search by,
skipped if null
;gender
- is Member.getGender()
, skipped if null
;
- Returns:
- entities by criteria or
Collections.emptyList()
on failure;
getTeeColorIds
public java.util.Collection<java.lang.String> getTeeColorIds(java.lang.String fieldPrimaryKey,
java.lang.String gender)
- Specified by:
getTeeColorIds
in interface HandicapService
- Parameters:
fieldPrimaryKey
- is EJBLocalObject.getPrimaryKey()
to search by,
skipped if null
;gender
- is Member.getGender()
, skipped if null
;
- Returns:
- is
Collection
of EJBLocalObject.getPrimaryKey()
selected by criteria or Collections.emptyList()
on failure;
getTeeColorIdsByMemberSSN
public java.util.Collection<java.lang.String> getTeeColorIdsByMemberSSN(java.lang.String fieldPrimaryKey,
java.lang.String memberSSN)
- Specified by:
getTeeColorIdsByMemberSSN
in interface HandicapService
- Parameters:
fieldPrimaryKey
- is EJBLocalObject.getPrimaryKey()
to search by,
skipped if null
;memberSSN
- is Member.getSSN()
(a social security number
which is also a personal id), not null
;
- Returns:
- is
Collection
of EJBLocalObject.getPrimaryKey()
selected by criteria or Collections.emptyList()
on failure;
getTeeColorDWR
public java.util.Map getTeeColorDWR(int fieldID,
java.lang.String gender)
- Specified by:
getTeeColorDWR
in interface HandicapService
- See Also:
getTeeColorDWR(int, java.lang.String)
getTees
public java.util.Collection getTees(Field field,
TeeColor teeColor,
int startHole,
int endHole)
- Specified by:
getTees
in interface HandicapService
- See Also:
getTees(is.idega.idegaweb.golf.entity.Field, is.idega.idegaweb.golf.entity.TeeColor, int, int)
getSlope
public int getSlope(Field field,
TeeColor teeColor)
- Specified by:
getSlope
in interface HandicapService
- See Also:
getSlope(is.idega.idegaweb.golf.entity.Field, is.idega.idegaweb.golf.entity.TeeColor)
getCourseRating
public float getCourseRating(Field field,
TeeColor teeColor)
- Specified by:
getCourseRating
in interface HandicapService
- See Also:
getCourseRating(is.idega.idegaweb.golf.entity.Field, is.idega.idegaweb.golf.entity.TeeColor)
getPar
public int getPar(Field field,
TeeColor teeColor)
- Specified by:
getPar
in interface HandicapService
- See Also:
getPar(is.idega.idegaweb.golf.entity.Field, is.idega.idegaweb.golf.entity.TeeColor)
getLength
public int getLength(Field field,
TeeColor teeColor)
- Specified by:
getLength
in interface HandicapService
- See Also:
getLength(is.idega.idegaweb.golf.entity.Field, is.idega.idegaweb.golf.entity.TeeColor)
hasLegitimateHandicap
public boolean hasLegitimateHandicap(Member member,
java.sql.Date date)
- Specified by:
hasLegitimateHandicap
in interface HandicapService
- See Also:
hasLegitimateHandicap(is.idega.idegaweb.golf.entity.Member, java.sql.Date)
hasLegitimateHandicap
public boolean hasLegitimateHandicap(int memberID,
java.sql.Date date)
- Specified by:
hasLegitimateHandicap
in interface HandicapService
- See Also:
hasLegitimateHandicap(is.idega.idegaweb.golf.entity.Member, java.sql.Date)
getHandicapBeforeDate
public float getHandicapBeforeDate(Member member,
java.sql.Date date)
- Specified by:
getHandicapBeforeDate
in interface HandicapService
- See Also:
getHandicapBeforeDate(is.idega.idegaweb.golf.entity.Member, java.sql.Date)
getHandicap
public float getHandicap(Member member)
- Specified by:
getHandicap
in interface HandicapService
- See Also:
getHandicap(is.idega.idegaweb.golf.entity.Member)
getTeeColorRGB
public java.lang.String getTeeColorRGB(TeeColor teeColor)
- Specified by:
getTeeColorRGB
in interface HandicapService
- See Also:
getTeeColorRGB(is.idega.idegaweb.golf.entity.TeeColor)
getTeeColorName
public java.lang.String getTeeColorName(TeeColor teeColor)
- Specified by:
getTeeColorName
in interface HandicapService
- See Also:
getTeeColorName(is.idega.idegaweb.golf.entity.TeeColor)
getTeeColor
public TeeColor getTeeColor(java.lang.Object teeColorPK)
- Specified by:
getTeeColor
in interface HandicapService
- See Also:
getTeeColor(java.lang.Object)
storeFirstHandicap
public void storeFirstHandicap(Member member,
float handicap)
- Specified by:
storeFirstHandicap
in interface HandicapService
- See Also:
storeFirstHandicap(is.idega.idegaweb.golf.entity.Member, float)
storeHandicapCorrection
public void storeHandicapCorrection(Member member,
java.sql.Timestamp timestamp,
float handicap)
- Specified by:
storeHandicapCorrection
in interface HandicapService
- See Also:
storeHandicapCorrection(is.idega.idegaweb.golf.entity.Member, java.sql.Timestamp, float)
storeHandicapCorrection
public void storeHandicapCorrection(Member member,
java.sql.Timestamp timestamp,
float handicap,
boolean yearlyUpdate)
- Specified by:
storeHandicapCorrection
in interface HandicapService
- See Also:
storeHandicapCorrection(is.idega.idegaweb.golf.entity.Member, java.sql.Timestamp, float)
getRealPoints
public int getRealPoints(Scorecard scorecard,
Scorecard previousScorecard)
throws java.sql.SQLException,
javax.ejb.FinderException
- Specified by:
getRealPoints
in interface HandicapService
- Throws:
java.sql.SQLException
javax.ejb.FinderException
- See Also:
getRealPoints(is.idega.idegaweb.golf.entity.Scorecard, is.idega.idegaweb.golf.entity.Scorecard)
getRealPoints
public int getRealPoints(Scorecard scorecard,
float handicapBefore)
throws java.sql.SQLException,
javax.ejb.FinderException
- Specified by:
getRealPoints
in interface HandicapService
- Throws:
java.sql.SQLException
javax.ejb.FinderException
- See Also:
getRealPoints(is.idega.idegaweb.golf.entity.Scorecard, is.idega.idegaweb.golf.entity.Scorecard)
getHandicapDWR
public float getHandicapDWR(float handicapBefore,
int totalPoints,
int numberOfHoles)
- Specified by:
getHandicapDWR
in interface HandicapService
- See Also:
getHandicapDWR(float, int, int)
getPointsDWR
public int getPointsDWR(int courseHandicap,
int par,
int holeHandicap,
int strokes)
- Specified by:
getPointsDWR
in interface HandicapService
- See Also:
getPointsDWR(int, int, int, int)
getPointsForPar
public int getPointsForPar(int holeHandicap,
int holePar,
int courseHandicap)
- Specified by:
getPointsForPar
in interface HandicapService
- See Also:
getPointsForPar(int, int, int)
getHandicapGroup
public int getHandicapGroup(float handicap)
- Specified by:
getHandicapGroup
in interface HandicapService
- See Also:
getHandicapGroup(float)
getHandicapGroupLowerGrayValue
public int getHandicapGroupLowerGrayValue(int group)
- Specified by:
getHandicapGroupLowerGrayValue
in interface HandicapService
- See Also:
getHandicapGroupLowerGrayValue(int)
getTeesPlayed
public java.util.Collection<TeeColor> getTeesPlayed(Member member)
- Specified by:
getTeesPlayed
in interface HandicapService
- See Also:
getTeesPlayed(is.idega.idegaweb.golf.entity.Member)
getFieldsPlayed
public java.util.Collection<Field> getFieldsPlayed(Member member)
- Specified by:
getFieldsPlayed
in interface HandicapService
- See Also:
getFieldsPlayed(is.idega.idegaweb.golf.entity.Member)
getTeeColor
public TeeColor getTeeColor(java.lang.String memberId)
- Specified by:
getTeeColor
in interface HandicapService
- Parameters:
memberId
- is EJBLocalObject.getPrimaryKey()
to search highest TeeColor
for,
not null
;
- Returns:
TeeColor
of highest result for given Member
or null
on failure;
getTeeColorId
public java.lang.String getTeeColorId(java.lang.String memberId)
- Specified by:
getTeeColorId
in interface HandicapService
- Parameters:
memberId
- is EJBLocalObject.getPrimaryKey()
to search by, not
null
;
- Returns:
EJBLocalObject.getPrimaryKey()
or CoreConstants.EMPTY
on failure;
getTeeColorIdByPersonalId
public java.lang.String getTeeColorIdByPersonalId(java.lang.String memberId)
- Specified by:
getTeeColorIdByPersonalId
in interface HandicapService
- Parameters:
memberId
- is EJBLocalObject.getPrimaryKey()
to search by, not
null
;
- Returns:
EJBLocalObject.getPrimaryKey()
or CoreConstants.EMPTY
on failure;
getMemberBySSN
protected Member getMemberBySSN(java.lang.String ssn)
getMemberHome
protected MemberHome getMemberHome()
getTeeColorHome
protected TeeColorHome getTeeColorHome()
getScoreCardBusiness
protected ScorecardBusiness getScoreCardBusiness()
Copyright © 2000-2014 idega software. All Rights Reserved.