public class ClonableProperty extends ExtendedProperty implements java.lang.Comparable<ClonableProperty>
ExtendedProperty
but with added support for regular
(static) properties.Type | Property and Description |
---|---|
boolean |
isExtended
Gets the value of the property extendedProperty.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESCRIPTION
The property name of the "static" property
ReporterData.getDescription() |
static java.lang.String |
ENTRY_DATE
The property name of the "static" property
ReporterData.getEntryDate() |
static java.lang.String |
EXTERNAL_ID
The property name of the "static" property
ReporterData.getExternalId() . |
static java.lang.String |
ID
The property name of the "static" property
BasicData.getId() . |
private boolean |
isExtendedProperty |
private boolean |
isMandatory |
static java.lang.String |
LAST_SOURCE
The property name of the "static" property
ReporterData.getLastSource() |
static java.lang.String |
LAST_UPDATE
The property name of the "static" property
ReporterData.getLastUpdate() |
private static boolean |
MANDATORY |
static java.lang.String |
NAME
The property name of the "static" property
ReporterData.getName() |
private static boolean |
NULLABLE |
static java.lang.String |
SYMBOL
The property name of the "static" property
ReporterData.getSymbol() |
static java.lang.String |
VERSION
The property name of the "static" property
BasicData.getVersion() . |
Modifier | Constructor and Description |
---|---|
private |
ClonableProperty(ExtendedProperty p)
Create a cloned property representation of an extended property
|
(package private) |
ClonableProperty(java.lang.String propertyName,
ReporterClonePropertyData d)
Create a cloned property representation of a data-layer
object.
|
private |
ClonableProperty(java.lang.String propertyName,
java.lang.String title,
java.lang.String description,
java.lang.String column,
Type valueType,
int length,
boolean nullable,
Formula.AverageMethod averageMethod,
boolean isMandatory)
Create a cloned property representation of a static property.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ClonableProperty o)
Sort by title, but mandatory properties before non-madatory.
|
static ClonableProperty |
create(java.lang.String name)
Create a cloned property from either an extended or static property.
|
static ClonableProperty |
createFromExtended(java.lang.String name)
Create a cloned property representation of an extended property.
|
static ClonableProperty |
createFromRegular(java.lang.String name)
Create a cloned property that represents the "static" property
with the given name.
|
boolean |
equals(java.lang.Object o) |
boolean |
exists()
Check if this cloned property still exists.
|
static java.util.List<ClonableProperty> |
getAll()
Get a list containing cloned property representation for all static and
extended properties.
|
static java.util.List<ClonableProperty> |
getAllMandatory()
Get a list with all mandatory properties that must be cloned.
|
int |
hashCode() |
boolean |
isExtendedProperty()
Gets the value of the property extendedProperty.
|
boolean |
isMandatory()
Check if this property is mandatory in all clone templates.
|
(package private) ReporterClonePropertyData |
toData()
Create a data-layer reprsentation of the cloned property.
|
java.lang.String |
toString() |
getAverageMethod, getColumn, getDescription, getLength, getName, getTitle, getType, getUrl, isAveragable, isHidden, isInsertable, isNullable, isRestrictedEdit, isUpdateable, isValidName, parseString, parseString, validateValue
public boolean isExtendedProperty
private static final boolean MANDATORY
private static final boolean NULLABLE
public static java.lang.String ID
BasicData.getId()
.
This property is mandatory in clone templates.public static java.lang.String VERSION
BasicData.getVersion()
.
This property is mandatory in clone templates.public static java.lang.String EXTERNAL_ID
ReporterData.getExternalId()
.
This property is mandatory in clone templates.public static java.lang.String NAME
ReporterData.getName()
public static java.lang.String SYMBOL
ReporterData.getSymbol()
public static java.lang.String ENTRY_DATE
ReporterData.getEntryDate()
public static java.lang.String LAST_SOURCE
ReporterData.getLastSource()
public static java.lang.String LAST_UPDATE
ReporterData.getLastUpdate()
public static java.lang.String DESCRIPTION
ReporterData.getDescription()
private final boolean isMandatory
private final boolean isExtendedProperty
private ClonableProperty(java.lang.String propertyName, java.lang.String title, java.lang.String description, java.lang.String column, Type valueType, int length, boolean nullable, Formula.AverageMethod averageMethod, boolean isMandatory)
private ClonableProperty(ExtendedProperty p)
p
- The extended property to cloneClonableProperty(java.lang.String propertyName, ReporterClonePropertyData d)
propertyName
- The name of the propertyd
- Other metadata for the propertypublic static ClonableProperty createFromRegular(java.lang.String name)
name
- The name of the static propertyItemNotFoundException
- If a property with the given name
doesn't existpublic static ClonableProperty createFromExtended(java.lang.String name)
name
- The name of the extended propertyItemNotFoundException
- If a property with the given name
doesn't existpublic static ClonableProperty create(java.lang.String name)
name
- The name of the propertyItemNotFoundException
- If a property with the given name
doesn't existpublic static java.util.List<ClonableProperty> getAll()
public static java.util.List<ClonableProperty> getAllMandatory()
ReporterClonePropertyData toData()
public boolean isExtendedProperty()
public boolean isMandatory()
public boolean exists()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(ClonableProperty o)
compareTo
in interface java.lang.Comparable<ClonableProperty>