Class BaseNature
java.lang.Object
org.castor.core.nature.BaseNature
- Direct Known Subclasses:
AppInfoJpaNature,AppInfoSolrjNature,JDOClassInfoNature,JDOFieldInfoNature,JDOOneToManyNature,JDOOneToOneNature,SolrjFieldInfoNature,XMLInfoNature
Adds property handle methods and a constructor including a health check. See
constructor comments for more details.
- Since:
- 1.2.1
- Author:
- Lukas Lang
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseNature(PropertyHolder holder) Constructor taking aPropertyHolder. -
Method Summary
Modifier and TypeMethodDescriptionprotected final booleangetBooleanPropertyDefaultFalse(String propertyName) Returns boolean value of the property or false if property value is null.protected final PropertyHolderReturns thePropertyHolder.getId()Returns the fully qualified name of the Nature.protected final ObjectgetProperty(String key) Returns the property mapped to the key or null if not set before.protected ListgetPropertyAsList(String property) Returns value of the property as a List.protected MapgetPropertyAsMap(String property) Returns value of the property as a List.protected final voidsetProperty(String key, Object property) Sets the property for a given.
-
Constructor Details
-
BaseNature
Constructor taking aPropertyHolder. Must be called from subclasses. Does a health check on the given PropertyHolder, whether the extending Nature exists.- Parameters:
holder- a PropertyHolder.
-
-
Method Details
-
getProperty
-
setProperty
-
getBooleanPropertyDefaultFalse
Returns boolean value of the property or false if property value is null. Make sure, not to request a property, which does not have a boolean value!- Parameters:
propertyName- name of the property.- Returns:
- false if null or false.
-
getHolder
-
getPropertyAsList
-
getPropertyAsMap
-
getId
String getId()Returns the fully qualified name of the Nature.- Returns:
- qualified name of the nature.
-