org.equanda.test.dm.server
Class ChoicesBean

java.lang.Object
  extended by org.equanda.test.dm.server.ChoicesBean
All Implemented Interfaces:
Serializable, EquandaEJB<Uoid>, ExceptionCodes, HasId<Uoid>, ChoicesBase, ChoicesEJB, ChoicesEJBLocal

public class ChoicesBean
extends Object
implements ChoicesEJB, ChoicesEJBLocal, ExceptionCodes, Serializable

Choices

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.equanda.persistence.ExceptionCodes
CME_DATA_HAS_BEEN_ALREADY_CHANGED, ECV_CANNOT_ADD_NULL_TO_MULTIPLE_FIELD, ECV_COMPARE_CONSTRAINT_NOT_SATISFIED, ECV_COMPARE_TYPE_CONSTRAINT_NOT_SATISFIED, ECV_CONSTRAINT_VIOLATION, ECV_COULD_NOT_TEST_CHOICES_USING_CLASS, ECV_DOWNCAST_CREATE_ERROR, ECV_DOWNCAST_FAILED_CANNOT_DOWNCAST_ROOT, ECV_DOWNCAST_SELECTOR_ERROR, ECV_FAILED_TO_CREATE_INCLUDED_VALUE, ECV_FAILED_TO_UPDATE_VALUE, ECV_FIELD_IS_REQUIRED, ECV_FIELD_IS_UNIQUE, ECV_IMMUTABLE_IF_OTHER_FIELD_IS_SET, ECV_INCLUDE_VALUE_HAS_WRONG_TYPE, ECV_INTERNAL_ERROR_ON_CREATE_INCLUDED_VALUE, ECV_INVALID_TABLE_TYPE, ECV_OTHERSIDE_EMBEDDED_FIELD_IMMUTABLE_ONCE_SET, ECV_VALUE_IS_NOT_ONE_OF_THE_CHOICES, UONA_OPERATION_NOT_ALLOWED, UPE_AUTO_FIELD_PROBLEM, UPE_CANNOT_CREATE_LAZYCOLLECTION, UPE_CANNOT_CREATE_SESSION_FACADE, UPE_CANNOT_INIT_BEAN, UPE_CASCADE_KEEP, UPE_FAILED_PROXY_REMOVE, UPE_FAILED_TO_UPDATE_VALUE, UPE_NULL_UOID_INVALID, UPE_OBJECT_NOT_FOUND, UPE_PERSISTENCE_EXCEPTION, UPE_TRYING_TO_UPDATE_OBJECT_WITH_UOID_NULL, UPE_UOID_NOT_FOUND
 
Constructor Summary
ChoicesBean()
           
 
Method Summary
 void addCountry(String el)
           
 void ejbActivate()
           
 void ejbPassivate()
           
 Collection<String> getCountries()
           
 String getCountry2Letter()
          Simple field with 2 letter ISO country code.
 String getCountry3Letter()
          Simple field with 3 letter ISO country code.
 String getCountry3LetterShortField()
          Simple field with 3 letter ISO country code, but for which the string field is too short which should make it impossible to store a valid value.
 String getCountryCodeString()
          Simple field with a numeric ISO country code, stored as string.
 int getCountryCodeValue()
          Simple field with a numeric ISO country code, stored as an integer.
 Choices getEquanda()
           
 Timestamp getEquandaModificationDate()
           
 String getEquandaName()
           
 String getEquandaStatus()
           
 String getEquandaType()
           
 long getEquandaVersion()
           
 Uoid getId()
           
 String getImmutableName()
           
 int getImmutableWeight()
           
 int getMonitorSize()
           
 String getSeason()
           
 boolean hasCountry(String el)
           
 void init(int immutableWeight, String immutableName)
           
 void init(String type, int immutableWeight, String immutableName)
           
 void init(Uoid id)
           
 void initEntity(EquandaEntity entity)
           
 boolean isEquandaType(String type)
           
protected  boolean objectEquals(Object obj1, Object obj2)
          utility routine to test equality of objects without relying on one of them being not null.
 void remove()
           
 void removeCountry(String el)
           
 void removeEntityBean()
           
 void setCountry2Letter(String country2Letter)
           
 void setCountry3Letter(String country3Letter)
           
 void setCountry3LetterShortField(String country3LetterShortField)
           
 void setCountryCodeString(String countryCodeString)
           
 void setCountryCodeValue(int countryCodeValue)
           
 void setEquandaStatus(String status)
           
 void setMonitorSize(int monitorSize)
           
 void setSeason(String season)
           
 void updateEquanda(Choices proxy)
          Internal routine to update based on a proxy object, update indicates whether all fields need setting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChoicesBean

public ChoicesBean()
Method Detail

init

public void init(Uoid id)
          throws EquandaPersistenceException
Specified by:
init in interface EquandaEJB<Uoid>
Throws:
EquandaPersistenceException

initEntity

public void initEntity(EquandaEntity entity)
                throws EquandaPersistenceException
Specified by:
initEntity in interface EquandaEJB<Uoid>
Throws:
EquandaPersistenceException

init

public void init(String type,
                 int immutableWeight,
                 String immutableName)
          throws EquandaPersistenceException
Specified by:
init in interface ChoicesBase
Throws:
EquandaPersistenceException

init

public void init(int immutableWeight,
                 String immutableName)
          throws EquandaPersistenceException
Specified by:
init in interface ChoicesBase
Throws:
EquandaPersistenceException

getId

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public Uoid getId()
Specified by:
getId in interface HasId<Uoid>

getEquandaModificationDate

@PermitAll
public Timestamp getEquandaModificationDate()
Specified by:
getEquandaModificationDate in interface EquandaEJB<Uoid>

getEquandaVersion

@PermitAll
public long getEquandaVersion()

getEquandaStatus

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getEquandaStatus()
Specified by:
getEquandaStatus in interface EquandaEJB<Uoid>

setEquandaStatus

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public void setEquandaStatus(String status)
Specified by:
setEquandaStatus in interface EquandaEJB<Uoid>

getEquandaType

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getEquandaType()
Specified by:
getEquandaType in interface EquandaEJB<Uoid>

isEquandaType

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public boolean isEquandaType(String type)
Specified by:
isEquandaType in interface EquandaEJB<Uoid>

getEquandaName

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getEquandaName()
Specified by:
getEquandaName in interface EquandaEJB<Uoid>

getEquanda

@PermitAll
public Choices getEquanda()
Specified by:
getEquanda in interface ChoicesBase

updateEquanda

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public void updateEquanda(Choices proxy)
                   throws EquandaPersistenceException
Internal routine to update based on a proxy object, update indicates whether all fields need setting

Specified by:
updateEquanda in interface ChoicesBase
Throws:
EquandaPersistenceException

getSeason

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getSeason()
Specified by:
getSeason in interface ChoicesBase

setSeason

public void setSeason(String season)
               throws EquandaPersistenceException
Specified by:
setSeason in interface ChoicesBase
Throws:
EquandaPersistenceException

getMonitorSize

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public int getMonitorSize()
Specified by:
getMonitorSize in interface ChoicesBase

setMonitorSize

public void setMonitorSize(int monitorSize)
                    throws EquandaPersistenceException
Specified by:
setMonitorSize in interface ChoicesBase
Throws:
EquandaPersistenceException

getImmutableWeight

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public int getImmutableWeight()
Specified by:
getImmutableWeight in interface ChoicesBase

getImmutableName

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getImmutableName()
Specified by:
getImmutableName in interface ChoicesBase

getCountries

public Collection<String> getCountries()
Specified by:
getCountries in interface ChoicesBase

addCountry

public void addCountry(String el)
                throws EquandaPersistenceException
Specified by:
addCountry in interface ChoicesBase
Throws:
EquandaPersistenceException

removeCountry

public void removeCountry(String el)
                   throws EquandaPersistenceException
Specified by:
removeCountry in interface ChoicesBase
Throws:
EquandaPersistenceException

hasCountry

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public boolean hasCountry(String el)
Specified by:
hasCountry in interface ChoicesBase

getCountry2Letter

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getCountry2Letter()
Simple field with 2 letter ISO country code.

Specified by:
getCountry2Letter in interface ChoicesBase

setCountry2Letter

public void setCountry2Letter(String country2Letter)
                       throws EquandaPersistenceException
Specified by:
setCountry2Letter in interface ChoicesBase
Throws:
EquandaPersistenceException

getCountry3Letter

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getCountry3Letter()
Simple field with 3 letter ISO country code.

Specified by:
getCountry3Letter in interface ChoicesBase

setCountry3Letter

public void setCountry3Letter(String country3Letter)
                       throws EquandaPersistenceException
Specified by:
setCountry3Letter in interface ChoicesBase
Throws:
EquandaPersistenceException

getCountry3LetterShortField

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getCountry3LetterShortField()
Simple field with 3 letter ISO country code, but for which the string field is too short which should make it impossible to store a valid value.

Specified by:
getCountry3LetterShortField in interface ChoicesBase

setCountry3LetterShortField

public void setCountry3LetterShortField(String country3LetterShortField)
                                 throws EquandaPersistenceException
Specified by:
setCountry3LetterShortField in interface ChoicesBase
Throws:
EquandaPersistenceException

getCountryCodeString

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getCountryCodeString()
Simple field with a numeric ISO country code, stored as string.

Specified by:
getCountryCodeString in interface ChoicesBase

setCountryCodeString

public void setCountryCodeString(String countryCodeString)
                          throws EquandaPersistenceException
Specified by:
setCountryCodeString in interface ChoicesBase
Throws:
EquandaPersistenceException

getCountryCodeValue

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public int getCountryCodeValue()
Simple field with a numeric ISO country code, stored as an integer.

Specified by:
getCountryCodeValue in interface ChoicesBase

setCountryCodeValue

public void setCountryCodeValue(int countryCodeValue)
                         throws EquandaPersistenceException
Specified by:
setCountryCodeValue in interface ChoicesBase
Throws:
EquandaPersistenceException

ejbActivate

public void ejbActivate()

ejbPassivate

public void ejbPassivate()

remove

@PermitAll
public void remove()
Specified by:
remove in interface EquandaEJB<Uoid>

removeEntityBean

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public void removeEntityBean()
                      throws EquandaPersistenceException
Specified by:
removeEntityBean in interface ChoicesBase
Throws:
EquandaPersistenceException

objectEquals

protected boolean objectEquals(Object obj1,
                               Object obj2)
utility routine to test equality of objects without relying on one of them being not null.

Parameters:
obj1 - one of the objects to compare
obj2 - other object to compare
Returns:
true when bot objects are equal


Copyright © 2007-2008. All Rights Reserved.