org.base.apps.core.data
Class BaseData<D>

java.lang.Object
  extended by org.base.apps.util.BaseNameable
      extended by org.base.apps.core.data.BaseData<D>
All Implemented Interfaces:
ApplicationData<D>, BeanContainer<D>, Nameable, Named
Direct Known Subclasses:
FileData

public abstract class BaseData<D>
extends BaseNameable
implements ApplicationData<D>

Author:
Kevan Simpson

Constructor Summary
protected BaseData()
           
protected BaseData(Class<D> beanType)
           
 
Method Summary
protected abstract  void configure(BasePersist persAnnot)
           
protected  Class<D> deriveBeanType()
           
 D getBean()
          Returns this container's data bean, which may be null.
protected  Class<D> getBeanType()
           
abstract  void load()
           
protected  org.apache.commons.logging.Log log()
          Fetches the logger for this class.
abstract  void save()
           
 void setBean(D bean)
          Sets this container's data bean.
protected  void setBeanType(Class<D> beanType)
           
 
Methods inherited from class org.base.apps.util.BaseNameable
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.base.apps.util.Nameable
setName
 
Methods inherited from interface org.base.apps.util.Named
getName
 

Constructor Detail

BaseData

protected BaseData()

BaseData

protected BaseData(Class<D> beanType)
Method Detail

getBean

public D getBean()
Description copied from interface: BeanContainer
Returns this container's data bean, which may be null.

Specified by:
getBean in interface BeanContainer<D>
Returns:
this container's data bean or null.
See Also:
BeanContainer.getBean()

setBean

public void setBean(D bean)
Description copied from interface: BeanContainer
Sets this container's data bean.

Specified by:
setBean in interface BeanContainer<D>
Parameters:
bean - this container's data bean.
See Also:
BeanContainer.setBean(java.lang.Object)

load

public abstract void load()
Specified by:
load in interface ApplicationData<D>
See Also:
ApplicationData.load()

save

public abstract void save()
Specified by:
save in interface ApplicationData<D>
See Also:
ApplicationData.save()

configure

protected abstract void configure(BasePersist persAnnot)

deriveBeanType

protected Class<D> deriveBeanType()
Returns:
the beanType

getBeanType

protected Class<D> getBeanType()
Returns:
the beanType

setBeanType

protected void setBeanType(Class<D> beanType)
Parameters:
beanType - the beanType to set

log

protected org.apache.commons.logging.Log log()
Fetches the logger for this class.


Please visit Base Apps, hosted on Sourceforge.net.

Copyright 2011, Blue Agate Software Entity (BASE)