Class Attributes
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
com.northconcepts.datapipeline.foundations.core.Attributes
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,JavaCodeGenerator,Serializable,Cloneable
User-defined name-value pairs that attach arbitrary metadata to schema, entity, relationship and field definitions;
kept sorted by name.
- See Also:
-
Field Summary
Fields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()copyFrom(Attributes attributes) booleanfromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).fromXmlElement(Element element) voidAppends Java source code representing this object to the given builder.getName(int index) Returns the name of the attribute at the given 0-based index, in name order.getNames()Returns a new list of the attribute names in sorted order.getValue(int index) Returns the value of the attribute at the given 0-based index, in name order.Returns the named attribute's value, ornullif it is missing.<T> TReturns the named attribute's value, ordefaultValueif it is missing or null.inthashCode()remove(int index) Removes the attribute at the given 0-based index, in name order.Removes the named attribute; throws aDataExceptionif there is none.intsize()toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.toXmlElement(Document document) Returns an element, created withdocument, describing this object; the default implementation throws aDataException.Methods inherited from class com.northconcepts.datapipeline.foundations.core.Bean
addExceptionProperties, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties, exception, exception, exception
-
Constructor Details
-
Attributes
public Attributes()
-
-
Method Details
-
clone
-
generateJavaCode
Description copied from interface:JavaCodeGeneratorAppends Java source code representing this object to the given builder.- Specified by:
generateJavaCodein interfaceJavaCodeGenerator
-
size
public int size() -
getName
Returns the name of the attribute at the given 0-based index, in name order. -
getValue
Returns the value of the attribute at the given 0-based index, in name order. -
remove
Removes the attribute at the given 0-based index, in name order. -
remove
Removes the named attribute; throws aDataExceptionif there is none. -
removeAll
-
getNames
Returns a new list of the attribute names in sorted order. -
getValue
Returns the named attribute's value, ornullif it is missing. -
getValue
Returns the named attribute's value, ordefaultValueif it is missing or null. -
setValue
-
copyFrom
-
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable- Overrides:
toRecordin classBean
-
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Overrides:
fromRecordin classBean- Parameters:
source-- Returns:
- this instance.
-
toXmlElement
Description copied from interface:XmlSerializableReturns an element, created withdocument, describing this object; the default implementation throws aDataException.- Specified by:
toXmlElementin interfaceXmlSerializable
-
fromXmlElement
- Specified by:
fromXmlElementin interfaceXmlSerializable
-
hashCode
public int hashCode() -
equals
-