com.rapidtransform.core.service.impl
Class ValidValueServiceImpl

java.lang.Object
  extended by com.rapidtransform.core.service.impl.ServiceImpl
      extended by com.rapidtransform.core.service.impl.ValidValueServiceImpl
All Implemented Interfaces:
Service, ValidValueService

public class ValidValueServiceImpl
extends ServiceImpl
implements ValidValueService

Author:
Steve

Constructor Summary
ValidValueServiceImpl()
           
 
Method Summary
 ValidValue find(java.lang.Class subclass, java.lang.Long id)
          Returns the ValidValue object for the given subclass and id.
 java.util.Collection<ValidValue> findAll(java.lang.Class subclass)
          Returns a list of all the valid values for the given ValidValue subclass
 java.util.Collection<ValidValue> findEnabled(java.lang.Class subclass)
          Returns a collection of all enabled ValidValues for the given ValidValue subclass.
 java.util.HashMap<java.lang.String,ValidValueDAO> getValidValueDAOs()
           
 java.util.Collection<java.lang.String> getValueListTypes()
          Returns a collection of existing value list types.
 void remove(ValidValue validValue)
          Removes the given valid value from the database.
 ValidValue save(ValidValue validValue)
          Creates or updates the given ValidValue object to the database.
 void setValidValueDAOs(java.util.HashMap<java.lang.String,ValidValueDAO> validValueDAOs)
           
 
Methods inherited from class com.rapidtransform.core.service.impl.ServiceImpl
getMessageSource, getSecurityService, setMessageSource, setSecurityService
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidValueServiceImpl

public ValidValueServiceImpl()
Method Detail

getValidValueDAOs

public java.util.HashMap<java.lang.String,ValidValueDAO> getValidValueDAOs()

setValidValueDAOs

public void setValidValueDAOs(java.util.HashMap<java.lang.String,ValidValueDAO> validValueDAOs)

save

public ValidValue save(ValidValue validValue)
                throws ConveloException
Description copied from interface: ValidValueService
Creates or updates the given ValidValue object to the database. This is a generic service method to be used by all subclass types of ValidValue.

Specified by:
save in interface ValidValueService
Returns:
Saved ValidValue object
Throws:
ConveloException

find

public ValidValue find(java.lang.Class subclass,
                       java.lang.Long id)
                throws ConveloException
Returns the ValidValue object for the given subclass and id.

Specified by:
find in interface ValidValueService
Parameters:
id -
Returns:
Throws:
ConveloException

findAll

public java.util.Collection<ValidValue> findAll(java.lang.Class subclass)
                                         throws ConveloException
Returns a list of all the valid values for the given ValidValue subclass

Specified by:
findAll in interface ValidValueService
Parameters:
subclass -
Returns:
Collection of ValidValue objects
Throws:
ConveloException - Exception generated if subclass is not mapped in the validValueDAOs map

findEnabled

public java.util.Collection<ValidValue> findEnabled(java.lang.Class subclass)
                                             throws ConveloException
Returns a collection of all enabled ValidValues for the given ValidValue subclass.

Specified by:
findEnabled in interface ValidValueService
Parameters:
subclass -
Returns:
Throws:
ConveloException

getValueListTypes

public java.util.Collection<java.lang.String> getValueListTypes()
Returns a collection of existing value list types.

Specified by:
getValueListTypes in interface ValidValueService
Returns:
Collection of ValidValue class names

remove

public void remove(ValidValue validValue)
            throws ConveloException
Removes the given valid value from the database.

Specified by:
remove in interface ValidValueService
Parameters:
validValue -
Throws:
ConveloException - Thrown if ValidValue type is not mapped in the validValueDAOs map