net.java.ao.types
Class TypeQualifiers

java.lang.Object
  extended by net.java.ao.types.TypeQualifiers

public class TypeQualifiers
extends Object

Describes optional modifiers to a type: string length for string types, precision and scale for numeric types. Each TypeInfo may have default qualifiers set by the database provider; qualifiers may also be modified by annotations.


Field Summary
static int MAX_STRING_LENGTH
          Maximum string length (for strings of limited length) cannot be set to greater than this value.
static int UNLIMITED_LENGTH
          If stringLength is set to this constant, the field is an unlimited-length string (TEXT, CLOB, or LONG VARCHAR).
 
Method Summary
static boolean areCompatible(TypeQualifiers derivedFromEntityAnnotations, TypeQualifiers derivedFromTableMetadata)
           
 boolean equals(Object other)
           
 Integer getPrecision()
           
 Integer getScale()
           
 Integer getStringLength()
           
 int hashCode()
           
 boolean hasPrecision()
           
 boolean hasScale()
           
 boolean hasStringLength()
           
 boolean isDefined()
           
 boolean isUnlimitedLength()
           
 boolean isUnlimitedStringLengthSupportCompatible(TypeQualifiers other)
           
 TypeQualifiers precision(int precision)
           
static TypeQualifiers qualifiers()
           
 TypeQualifiers scale(int scale)
           
 TypeQualifiers stringLength(int stringLength)
           
 String toString()
           
 TypeQualifiers withQualifiers(TypeQualifiers overrides)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_STRING_LENGTH

public static final int MAX_STRING_LENGTH
Maximum string length (for strings of limited length) cannot be set to greater than this value. This is the lowest common denominator for maximum string length in all supported databases.

See Also:
Constant Field Values

UNLIMITED_LENGTH

public static final int UNLIMITED_LENGTH
If stringLength is set to this constant, the field is an unlimited-length string (TEXT, CLOB, or LONG VARCHAR).

See Also:
Constant Field Values
Method Detail

qualifiers

public static TypeQualifiers qualifiers()

precision

public TypeQualifiers precision(int precision)

scale

public TypeQualifiers scale(int scale)

stringLength

public TypeQualifiers stringLength(int stringLength)

withQualifiers

public TypeQualifiers withQualifiers(TypeQualifiers overrides)

getPrecision

public Integer getPrecision()

getScale

public Integer getScale()

getStringLength

public Integer getStringLength()

isDefined

public boolean isDefined()

hasPrecision

public boolean hasPrecision()

hasScale

public boolean hasScale()

hasStringLength

public boolean hasStringLength()

isUnlimitedLength

public boolean isUnlimitedLength()

isUnlimitedStringLengthSupportCompatible

public boolean isUnlimitedStringLengthSupportCompatible(TypeQualifiers other)

areCompatible

public static boolean areCompatible(TypeQualifiers derivedFromEntityAnnotations,
                                    TypeQualifiers derivedFromTableMetadata)

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2014. All Rights Reserved.