Package org.appng.api.model
Class SimpleProperty
- java.lang.Object
-
- org.appng.api.model.SimpleProperty
-
- All Implemented Interfaces:
Serializable
,Comparable<Property>
,Identifiable<String>
,Property
- Direct Known Subclasses:
PropertyImpl
public class SimpleProperty extends Object implements Property, Identifiable<String>, Comparable<Property>
DefaultProperty
-implementation- Author:
- Matthias Müller
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.appng.api.model.Property
Property.Type
-
-
Constructor Summary
Constructors Constructor Description SimpleProperty()
SimpleProperty(String name, String value)
SimpleProperty(String name, String value, String defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Property other)
void
determineType()
String
getActualString()
byte[]
getBlob()
If thisProperty
contains BLOB data, this data is being returned.Boolean
getBoolean()
Returns theBoolean
-value of thisProperty
:Boolean.TRUE
ifProperty.getString()
returnstrue
or1
Boolean.FALSE
if theProperty.getString()
returns a non-nullString
null
otherwiseBoolean
getChangedValue()
String
getClob()
If thisProperty
contains CLOB data, this data is being returned.String
getDefaultString()
Returns the defaultString
-value of thisProperty
.String
getDescription()
Returns the description of thisProperty
.Double
getDouble()
Returns theDouble
-value of thisProperty
usingDouble.parseDouble(String)
, ifProperty.getString()
returns a non-nullString
,null
otherwise.Float
getFloat()
Returns theFloat
-value of thisProperty
usingFloat.parseFloat(String)
, ifProperty.getString()
returns a non-nullString
,null
otherwise.String
getId()
Returns the id.Integer
getInteger()
Returns theInteger
-value of thisProperty
usingInteger.parseInt(String)
, ifProperty.getString()
returns a non-nullString
,null
otherwise.@NotNull @Size(min=3,max=255) String
getName()
Returns the name of thisProperty
, as used inProperties.getXXX(String)
.String
getString()
Returns theString
-value of thisProperty
Property.Type
getType()
Returns the type of this propertyObject
getValue()
Date
getVersion()
boolean
isMandatory()
void
setActualString(String value)
void
setBlob(byte[] blob)
void
setClob(String clob)
void
setDefaultString(String defaultValue)
void
setDescription(String description)
void
setId(String id)
void
setMandatory(boolean mandatory)
void
setName(String name)
void
setString(String value)
void
setType(Property.Type type)
void
setValue(Object value)
void
setVersion(Date version)
String
toString()
-
-
-
Method Detail
-
getName
@NotNull @Size(min=3, max=255) public @NotNull @Size(min=3,max=255) String getName()
Description copied from interface:Property
Returns the name of thisProperty
, as used inProperties.getXXX(String)
.
-
setName
public void setName(String name)
-
isMandatory
public boolean isMandatory()
- Specified by:
isMandatory
in interfaceProperty
-
setMandatory
public void setMandatory(boolean mandatory)
-
getId
public String getId()
Description copied from interface:Identifiable
Returns the id.- Specified by:
getId
in interfaceIdentifiable<String>
- Returns:
- the id
-
setId
public void setId(String id)
-
getVersion
public Date getVersion()
-
setVersion
public void setVersion(Date version)
-
getActualString
public String getActualString()
-
setActualString
public void setActualString(String value)
-
getDefaultString
public String getDefaultString()
Description copied from interface:Property
Returns the defaultString
-value of thisProperty
.- Specified by:
getDefaultString
in interfaceProperty
- Returns:
- the default
String
-value
-
setDefaultString
public void setDefaultString(String defaultValue)
-
getDescription
public String getDescription()
Description copied from interface:Property
Returns the description of thisProperty
.- Specified by:
getDescription
in interfaceProperty
- Returns:
- the description
-
setDescription
public void setDescription(String description)
-
getBlob
public byte[] getBlob()
Description copied from interface:Property
If thisProperty
contains BLOB data, this data is being returned.- Specified by:
getBlob
in interfaceProperty
- Returns:
- the BLOB data, (may be
null
) - See Also:
Properties.getBlob(String)
-
setBlob
public void setBlob(byte[] blob)
-
getClob
public String getClob()
Description copied from interface:Property
If thisProperty
contains CLOB data, this data is being returned.- Specified by:
getClob
in interfaceProperty
- Returns:
- the CLOB data, (may be
null
) - See Also:
Properties.getClob(String)
,Properties.getClob(String, String)
-
setClob
public void setClob(String clob)
-
getString
public String getString()
Description copied from interface:Property
Returns theString
-value of thisProperty
- Specified by:
getString
in interfaceProperty
- Returns:
- the
String
-value - See Also:
Properties.getString(String)
,Properties.getString(String, String)
-
setString
public void setString(String value)
-
getInteger
public Integer getInteger()
Description copied from interface:Property
Returns theInteger
-value of thisProperty
usingInteger.parseInt(String)
, ifProperty.getString()
returns a non-nullString
,null
otherwise.- Specified by:
getInteger
in interfaceProperty
- Returns:
- the
Integer
-value (may benull
) - See Also:
Properties.getInteger(String)
,Properties.getInteger(String, Integer)
-
getFloat
public Float getFloat()
Description copied from interface:Property
Returns theFloat
-value of thisProperty
usingFloat.parseFloat(String)
, ifProperty.getString()
returns a non-nullString
,null
otherwise.- Specified by:
getFloat
in interfaceProperty
- Returns:
- the
Float
-value (may benull
) - See Also:
Properties.getFloat(String)
,Properties.getFloat(String, Float)
-
getDouble
public Double getDouble()
Description copied from interface:Property
Returns theDouble
-value of thisProperty
usingDouble.parseDouble(String)
, ifProperty.getString()
returns a non-nullString
,null
otherwise.- Specified by:
getDouble
in interfaceProperty
- Returns:
- the
Double
-value (may benull
) - See Also:
Properties.getDouble(String)
,Properties.getDouble(String, Double)
-
getBoolean
public Boolean getBoolean()
Description copied from interface:Property
Returns theBoolean
-value of thisProperty
:Boolean.TRUE
ifProperty.getString()
returnstrue
or1
Boolean.FALSE
if theProperty.getString()
returns a non-nullString
null
otherwise
- Specified by:
getBoolean
in interfaceProperty
- Returns:
- the
Boolean
-value (may benull
) - See Also:
Properties.getBoolean(String)
,Properties.getBoolean(String, Boolean)
-
getChangedValue
public Boolean getChangedValue()
-
getType
public Property.Type getType()
Description copied from interface:Property
Returns the type of this property
-
setType
public void setType(Property.Type type)
-
getValue
public Object getValue()
-
setValue
public void setValue(Object value)
-
determineType
public void determineType()
-
compareTo
public int compareTo(Property other)
- Specified by:
compareTo
in interfaceComparable<Property>
-
-