Class Bean
java.lang.Object
com.northconcepts.datapipeline.foundations.core.Bean
- All Implemented Interfaces:
DataExceptionContributor,JsonSerializable,RecordSerializable,XmlSerializable,Serializable
- Direct Known Subclasses:
AmazonS3File,Attributes,BloombergMessage,Column,DateTimePattern,DateTimePatternMatch,Diff,FoundationObject,JdbcFieldIndex,JdbcImportedKey,JdbcIndex,JdbcQuery,JdbcQueryColumn,JdbcQueryParameter,JdbcTable,JdbcTableColumn,JiraIssue,JiraSearch,LocalFile,NumberDescriptor,NumberMatch,Property,ShopifyCustomerCriteria,ShopifyEventCriteria,ShopifyInventoryItem,ShopifyInventoryItemCriteria,ShopifyInventoryLevelCriteria,ShopifyOrder,ShopifyProductCriteria,ShopifyShippingAddress,Tags,Tree
public class Bean
extends Object
implements Serializable, RecordSerializable, XmlSerializable, DataExceptionContributor
Base class for Java beans wishing to participate in Java, Record, XML, and JSON serialization;
adding their properties to DataException; and having a dynamic toString().
- 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 TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this object's current state to aDataException.fromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.toString()Returns a basic JSON representation of this instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.DataExceptionContributor
addExceptionProperties, exception, exception, exceptionMethods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, fromJson, toJson, toJson, toJsonMethods inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
fromXml, fromXml, fromXmlElement, toXml, toXml, toXml, toXml, toXml, toXmlElement
-
Constructor Details
-
Bean
public Bean()
-
-
Method Details
-
addExceptionProperties
Description copied from interface:DataExceptionContributorAdds this object's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.- Specified by:
addExceptionPropertiesin interfaceDataExceptionContributor
-
toString
Returns a basic JSON representation of this instance. -
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable
-
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- Parameters:
source-- Returns:
- this instance.
-