Follow the links below to browse sample Javadoc for MJ classes and tools, including the MJ Runtime Library.

 

Package: com.arsi.mj.datatype  previous next contents

Classify data by content and by usage in MAPPER application.

Classes and Interfaces
DataTypeBase Base class for data type classes, defines commonalities.
DataTypeHibernateFactory Simple factory class that converts Hibernate data types to IDataType implementations.
IDataType Defines a data type supported by MJ.
IntegerType Represents an integer data type.
LongType Represents an long integer data type.
MaprptDataType The most fundamental data types supported natively by Mapper (note that date and time are supported as numeric or string types in Mapper and manipulated by special commands and functions).
MaprptUsageDataType Modifies the fundamental data types supported natively by Mapper to describe the actual or implied format and/or usage of the data (as column or variable) in a Mapper RUN.
NoopType Represents an noop (pass-thru string) data type.

Class: DataTypeBase   next package

Base class for data type classes, defines commonalities.
Treat this class as "thread-safe" since it is immutable once created.
public abstract class com.arsi.mj.datatype.DataTypeBase
  extends java.lang.Object
Fields
Hibernate type associated with this data type.
protected final org.hibernate.type.BasicType type
Constructors
Restricted ctor for initializing an instance of this class.
Parameters:
aType - Hibernate type associated with this data type.
protected DataTypeBase(org.hibernate.type.BasicType aType)
Methods
public boolean equals(java.lang.Object anObject)
Get the Hibernate type associated with this data type.
Returns:
Hibernate type.
public org.hibernate.type.BasicType getType()
public int hashCode()

Class: DataTypeHibernateFactory   previous next package

Simple factory class that converts Hibernate data types to IDataType implementations. This class is a singleton.
Treat this class as "thread-safe" since it is immutable once created.
public class com.arsi.mj.datatype.DataTypeHibernateFactory
  extends java.lang.Object
Constructors
public DataTypeHibernateFactory()
Methods
Get data type as IDataType implementation from Hibernate type based on Spring configuration.
Parameters:
anAppCtx - Spring application context for lookup up data type beans.
aHibernateType - one of the Hibernate types supported by MJ.
Returns:
data type instance.
public com.arsi.mj.datatype.IDataType dataTypeFromHibernateType(org.springframework.context.ApplicationContext anAppCtx, org.hibernate.type.BasicType aHibernateType)
Get previously created singleton instance of this class.
Returns:
singleton instance of this class.
public static synchronized com.arsi.mj.datatype.DataTypeHibernateFactory getInstance()

Interface: IDataType   previous next package

Defines a data type supported by MJ.
Parameters:
<T> - native type as a Java type wrapper class (e.g., Integer) or standard JDK type (e.g., String, BigDecimal)
<F> - java.text.Format-derived class for converting native type to string value for loading into database via ETL script. For example, a SimpleDateFormat is an appropriate formatter for native type java.util.Date.
public interface com.arsi.mj.datatype.IDataType
Methods
Convert a native value of this type into another native type.
Parameters:
aValue - native value of this type to convert.
aType - Hibernate type to convert to.
Returns:
converted native type.
public java.lang.Object convertTo(java.lang.Object aValue, org.hibernate.type.BasicType aType)
Get Format-derived instance that render a native value of this type into a string suitable for loading into the database using an ETL script.
Returns:
java.text.Format-derived instance for rendering native value to string.
public java.text.Format getEtlOutputFormat()
Get the Hibernate type of this data type, which must be one of these:
  • BigDecimalType
  • BigIntegerType
  • BlobType
  • BooleanType
  • CharacterArrayType
  • CharacterType
  • ClobType
  • DateType
  • DoubleType
  • FloatType
  • IntegerType
  • LongType
  • NumericBooleanType
  • StringType
  • TimestampType
  • TrueFalseType
  • YesNoType

Returns:
the Hibernate type.
public org.hibernate.type.BasicType getType()

Class: IntegerType   previous next package

Represents an integer data type. Treat this class as "thread-safe" since it is immutable once created.
public class com.arsi.mj.datatype.IntegerType
  extends com.arsi.mj.datatype.DataTypeBase
  implements com.arsi.mj.datatype.IDataType
Methods
public java.lang.Object convertTo(java.lang.Integer aValue, org.hibernate.type.BasicType aType)
public java.text.DecimalFormat getEtlOutputFormat()
Set Format-derived instance that render a native value of this type into a string suitable for loading into the database using an ETL script.
Parameters:
aFmt - java.text.Format-derived instance for rendering native value to string.
public void setEtlOutputFormat(java.text.DecimalFormat aFmt)

Class: LongType   previous next package

Represents an long integer data type. Treat this class as "thread-safe" since it is immutable once created.
public class com.arsi.mj.datatype.LongType
  extends com.arsi.mj.datatype.DataTypeBase
  implements com.arsi.mj.datatype.IDataType
Methods
public java.lang.Object convertTo(java.lang.Long aValue, org.hibernate.type.BasicType aType)
public java.text.DecimalFormat getEtlOutputFormat()
Set Format-derived instance that render a native value of this type into a string suitable for loading into the database using an ETL script.
Parameters:
aFmt - java.text.Format-derived instance for rendering native value to string.
public void setEtlOutputFormat(java.text.DecimalFormat aFmt)

Class: MaprptDataType   previous next package

The most fundamental data types supported natively by Mapper (note that date and time are supported as numeric or string types in Mapper and manipulated by special commands and functions).
public final class com.arsi.mj.datatype.MaprptDataType
  extends java.lang.Enum
Fields
public static final com.arsi.mj.datatype.MaprptDataType FLOAT
public static final com.arsi.mj.datatype.MaprptDataType INTEGER
public static final com.arsi.mj.datatype.MaprptDataType STRING
Methods
public static com.arsi.mj.datatype.MaprptDataType valueOf(java.lang.String name)
public static com.arsi.mj.datatype.MaprptDataType values()

Class: MaprptUsageDataType   previous next package

Modifies the fundamental data types supported natively by Mapper to describe the actual or implied format and/or usage of the data (as column or variable) in a Mapper RUN. This includes dates and times typically supported as numeric or string types in Mapper.
public final class com.arsi.mj.datatype.MaprptUsageDataType
  extends java.lang.Enum
Fields
public static final com.arsi.mj.datatype.MaprptUsageDataType BFN_LINE_PTR
public static final com.arsi.mj.datatype.MaprptUsageDataType BOOLEAN
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE0_YMMDD
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE11_YYYYMMDD
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE12_DD_MMM_YYYY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE14_YYYYDDD
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE15_DDMMYYYY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE16_MM_DD_YYYY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE18_MMDDYYYY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE19_DD_MM_YYYY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE1_YYMMDD
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE20_YYYY_MM_DD
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE2_DD_MMM_YY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE3_YDDD
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE4_YYDDD
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE5_DDMMYY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE6_MM_DD_YY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE7_MONTH_DD_YYYY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE8_MMDDYY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATE9_DD_MM_YY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATEC_MONTH_NAME
public static final com.arsi.mj.datatype.MaprptUsageDataType DATED_DAY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATEJ_JULIAN_DAY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATEM_MONTH
public static final com.arsi.mj.datatype.MaprptUsageDataType DATEN_WEEKDAY_NUMBER
public static final com.arsi.mj.datatype.MaprptUsageDataType DATEW_WEEKDAY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATEY_YY
public static final com.arsi.mj.datatype.MaprptUsageDataType DATEZ_YYYY
public static final com.arsi.mj.datatype.MaprptUsageDataType EQUATION_FIELD_LABEL
public static final com.arsi.mj.datatype.MaprptUsageDataType FLOAT
public static final com.arsi.mj.datatype.MaprptUsageDataType INTEGER
public static final com.arsi.mj.datatype.MaprptUsageDataType LINE_NUMBER_PTR
public static final com.arsi.mj.datatype.MaprptUsageDataType NUMBER
public static final com.arsi.mj.datatype.MaprptUsageDataType STRING
public static final com.arsi.mj.datatype.MaprptUsageDataType TIME
public static final com.arsi.mj.datatype.MaprptUsageDataType TIME0_HH_MM_SS
public static final com.arsi.mj.datatype.MaprptUsageDataType TIME1_HH_MM
public static final com.arsi.mj.datatype.MaprptUsageDataType TIME2_HHMMSS
public static final com.arsi.mj.datatype.MaprptUsageDataType TIME3_HHMM
public static final com.arsi.mj.datatype.MaprptUsageDataType TIME4_HHHHHHH_MM_SS
public static final com.arsi.mj.datatype.MaprptUsageDataType TIME5_HHHHHHH_MM
public static final com.arsi.mj.datatype.MaprptUsageDataType TIMEH_HOUR
public static final com.arsi.mj.datatype.MaprptUsageDataType TIMEM_MINUTE
public static final com.arsi.mj.datatype.MaprptUsageDataType TIMES_SECOND
Methods
Given a data type, return corresponding usage data type.
Parameters:
aDataType - a non-NULL data type.
Returns:
corresponding usage data type.
public static com.arsi.mj.datatype.MaprptUsageDataType fromDataType(com.arsi.mj.datatype.MaprptDataType aDataType)
Given a shorthand date specification, return corresponding usage data type.
Parameters:
aDnSpec - shorthand date specification of form Dn, where "n" is number or letter, e.g., "D0", "d20" or "dy".
Returns:
corresponding usage data type or NULL if none.
public static com.arsi.mj.datatype.MaprptUsageDataType fromDateSpecD_n(java.lang.String aDnSpec)
Given a shorthand time specification, return corresponding usage data type.
Parameters:
aTnSpec - shorthand time specification of form Tn, where "n" is number or letter, e.g., "T0", "t5" or "th".
Returns:
corresponding usage data type or NULL if none.
public static com.arsi.mj.datatype.MaprptUsageDataType fromTimeSpecT_n(java.lang.String aTnSpec)
Get Mapper data type that is most similar to, or is typically employed to store, the corresponding usage data type.
Returns:
Mapper data type that is most similar to usage data type.
public com.arsi.mj.datatype.MaprptDataType getMostSimilarDataType()
Is this usage data type considered to be a type of date?
public boolean isDate()
Is this usage data type considered to be a type of time?
public boolean isTime()
public static com.arsi.mj.datatype.MaprptUsageDataType valueOf(java.lang.String name)
public static com.arsi.mj.datatype.MaprptUsageDataType values()

Class: NoopType   previous package

Represents an noop (pass-thru string) data type. Treat this class as "thread-safe" since it is immutable once created.
public class com.arsi.mj.datatype.NoopType
  extends com.arsi.mj.datatype.DataTypeBase
  implements com.arsi.mj.datatype.IDataType
Constructors
Restricted ctor for initializing an instance of this class.
public NoopType()
Methods
public java.lang.Object convertTo(java.lang.String aValue, org.hibernate.type.BasicType aType)
public java.text.MessageFormat getEtlOutputFormat()
Set Format-derived instance that render a native value of this type into a string suitable for loading into the database using an ETL script.
Parameters:
aFmt - java.text.Format-derived instance for rendering native value to string.
public void setEtlOutputFormat(java.text.MessageFormat aFmt)