Package acdp.design
Class ST
java.lang.Object
acdp.design.ST
Provides factory methods which return a built-in simple column type that can be used as second argument of the
CL.ofArray(int, SimpleType) method.- Author:
- Beat Hörmann
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the constants used to indicate whether a column allows for thenullvalue or not.static enumDefines the constants used to indicate the maximum number of characters of an outrow string. -
Method Summary
Modifier and TypeMethodDescriptionstatic final SimpleType<Boolean>Returns the column type analogon of a JavabooleanorBooleantype.static final SimpleType<Byte>Returns the column type analogon of a JavabyteorBytetype.static final SimpleType<Double>Returns the column type analogon of a JavadoubleorDoubletype.static final SimpleType<Float>Returns the column type analogon of a JavafloatorFloattype.static final SimpleType<Integer>Returns column type analogon of a JavaintorIntegertype.static final SimpleType<Long>Returns the column type analogon of a JavalongorLongtype.static final SimpleType<Short>Returns the column type analogon of a JavashortorShorttype.static final SimpleType<String>beString()Returns the column type analogon of a JavaStringtype.static final SimpleType<String>beString(ST.Nulls nulls, ST.OutrowStringLength length) Returns the String column type with an outrow storage scheme and applying the "UTF-8" charset for any byte conversions.static final SimpleType<String>Returns the String column type with an inrow storage scheme and applying the specified charset for any byte conversions.static final SimpleType<String>beString(Charset charset, ST.Nulls nulls, ST.OutrowStringLength length) Returns the String column type with an outrow storage scheme and applying the specified charset for any byte conversions.
-
Method Details
-
beBoolean
Returns the column type analogon of a JavabooleanorBooleantype. It is safe to cast the returned value to theBooleanTypeinterface.- Parameters:
nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.- Returns:
- The Boolean column type.
-
beByte
Returns the column type analogon of a JavabyteorBytetype. It is safe to cast the returned value to theByteTypeinterface.- Parameters:
nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.- Returns:
- The Byte column type.
-
beShort
Returns the column type analogon of a JavashortorShorttype. It is safe to cast the returned value to theShortTypeinterface.- Parameters:
nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.- Returns:
- The Short column type.
-
beInteger
Returns column type analogon of a JavaintorIntegertype. It is safe to cast the returned value to theIntegerTypeinterface.- Parameters:
nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.- Returns:
- The Integer column type.
-
beLong
Returns the column type analogon of a JavalongorLongtype. It is safe to cast the returned value to theLongTypeinterface.- Parameters:
nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.- Returns:
- The Long column type.
-
beFloat
Returns the column type analogon of a JavafloatorFloattype. It is safe to cast the returned value to theFloatTypeinterface.- Parameters:
nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.- Returns:
- The Float column type.
-
beDouble
Returns the column type analogon of a JavadoubleorDoubletype. It is safe to cast the returned value to theDoubleTypeinterface.- Parameters:
nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.- Returns:
- The Double column type.
-
beString
Returns the column type analogon of a JavaStringtype. It is safe to cast the returned value to theStringTypeinterface.Invoking this method has the same effect as invoking
beString(Nulls.NULLABLE, OutrowStringLength.GIANT).- Returns:
- The String column type.
-
beString
Returns the String column type with an outrow storage scheme and applying the "UTF-8" charset for any byte conversions. It is safe to cast the returned value to theStringTypeinterface.Invoking this method has the same effect as invoking
beString(StandardCharsets.UTF_8, nulls, length).- Parameters:
nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.length- The length of the string.- Returns:
- The String column type.
-
beString
public static final SimpleType<String> beString(Charset charset, ST.Nulls nulls, ST.OutrowStringLength length) throws NullPointerException Returns the String column type with an outrow storage scheme and applying the specified charset for any byte conversions. It is safe to cast the returned value to theStringTypeinterface.- Parameters:
charset- TheCharsetto be used to encode a string value, not allowed to benull.nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.length- The length of the string.- Returns:
- The String column type.
- Throws:
NullPointerException- Ifcharsetisnull.
-
beString
public static final SimpleType<String> beString(Charset charset, ST.Nulls nulls, int length) throws NullPointerException, IllegalArgumentException Returns the String column type with an inrow storage scheme and applying the specified charset for any byte conversions. It is safe to cast the returned value to theStringTypeinterface.- Parameters:
charset- TheCharsetto be used to encode a string value, not allowed to benull.nulls- Must be set toNulls.NULLABLEif the type allows thenullvalue,Nulls.NO_NULLif not.length- The maximum number of characters of the String, must be greater than or equal to 1 and less than or equal toInteger.MAX_VALUE- 4. Depending on the character set the maximum number of characters may be less than this value.- Returns:
- The String column type.
- Throws:
NullPointerException- Ifcharsetisnull.IllegalArgumentException- Iflengthis less than 1 or greater thanInteger.MAX_VALUE- 4.
-