Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr.query.model
Interface TypeSystem

All Known Subinterfaces:
  JcrTypeSystem

All Known Implementing Classes:
  ValueTypeSystem

    @Immutable
    public interface TypeSystem

An interface that defines the value types used in tuples.

Nested Class Summary
`static interface` | `TypeSystem.TypeFactory<T>` Factory interface for creating values from strings.

Method Summary
`String` | `asString(Object value)` Get the string representation of the supplied value, using the most appropriate factory given the value.
`TypeSystem.TypeFactory<?>` | `getBinaryFactory()` Get the type factory for binary objects.
`TypeSystem.TypeFactory<Boolean>` | `getBooleanFactory()` Get the type factory for boolean types.
`String` | `getCompatibleType(String type1, String type2)` Get the type that is compatible with both of the supplied types.
`TypeSystem.TypeFactory<?>` | `getDateTimeFactory()` Get the type factory for date-time objects.
`TypeSystem.TypeFactory<BigDecimal>` | `getDecimalFactory()` Get the type factory for decimal types.
`Comparator<Object>` | `getDefaultComparator()` Get the comparator that should be used by default.
`String` | `getDefaultType()` Get the name of the type that is used by default.
`TypeSystem.TypeFactory<Double>` | `getDoubleFactory()` Get the type factory for double types.
`TypeSystem.TypeFactory<Long>` | `getLongFactory()` Get the type factory for long types.
`TypeSystem.TypeFactory<?>` | `getPathFactory()` Get the type factory for path objects.
`TypeSystem.TypeFactory<?>` | `getReferenceFactory()` Get the type factory for references objects.
`TypeSystem.TypeFactory<String>` | `getStringFactory()` Get the type factory for string types.
`TypeSystem.TypeFactory<?>` | `getTypeFactory(Object prototype)` Get the type factory for the type denoted by the supplied prototype value.
`TypeSystem.TypeFactory<?>` | `getTypeFactory(String typeName)` Get the type factory given the name of the type.
`Set<String>` | `getTypeNames()` Get the names of the supported types.

Method Detail

### getTypeFactory

    TypeSystem.TypeFactory<?> getTypeFactory(String typeName)

  Get the type factory given the name of the type.

  Parameters:
    `typeName` - the name of the type
  Returns:
    the type factory, or null if there is no such type in this system

### getTypeFactory

    TypeSystem.TypeFactory<?> getTypeFactory(Object prototype)

  Get the type factory for the type denoted by the supplied prototype value.

  Parameters:
    `prototype` - the value whose type is to be identified
  Returns:
    the type factory, or null if there is no such type in this system

### getBooleanFactory

    TypeSystem.TypeFactory<Boolean> getBooleanFactory()

  Get the type factory for boolean types.

  Returns:
    the boolean factory; never null

### getLongFactory

    TypeSystem.TypeFactory<Long> getLongFactory()

  Get the type factory for long types.

  Returns:
    the long factory; never null

### getStringFactory

    TypeSystem.TypeFactory<String> getStringFactory()

  Get the type factory for string types.

  Returns:
    the string factory; never null

### getDoubleFactory

    TypeSystem.TypeFactory<Double> getDoubleFactory()

  Get the type factory for double types.

  Returns:
    the double factory; never null

### getDecimalFactory

    TypeSystem.TypeFactory<BigDecimal> getDecimalFactory()

  Get the type factory for decimal types.

  Returns:
    the decimal factory; never null

### getDateTimeFactory

    TypeSystem.TypeFactory<?> getDateTimeFactory()

  Get the type factory for date-time objects.

  Returns:
    the date-time factory, or null if this type system doesn't support date-time objects

### getPathFactory

    TypeSystem.TypeFactory<?> getPathFactory()

  Get the type factory for path objects.

  Returns:
    the path factory, or null if this type system doesn't support path objects

### getReferenceFactory

    TypeSystem.TypeFactory<?> getReferenceFactory()

  Get the type factory for references objects.

  Returns:
    the reference factory, or null if this type system doesn't support reference objects

### getBinaryFactory

    TypeSystem.TypeFactory<?> getBinaryFactory()

  Get the type factory for binary objects.

  Returns:
    the binary factory, or null if this type system doesn't support binary objects

### getDefaultType

    String getDefaultType()

  Get the name of the type that is used by default.

  Returns:
    the default type name; never null

### getDefaultComparator

    Comparator<Object> getDefaultComparator()

  Get the comparator that should be used by default.

  Returns:
    the default comparator; never null

### getTypeNames

    Set<String> getTypeNames()

  Get the names of the supported types.

  Returns:
    the immutable set of the uppercase names of the types; never null

### asString

    String asString(Object value)

  Get the string representation of the supplied value, using the most appropriate factory given the value.

  Parameters:
    `value` - the value
  Returns:
    the string representation; never null

### getCompatibleType

    String getCompatibleType(String type1,
                             String type2)

  Get the type that is compatible with both of the supplied types.

  Parameters:
    `type1` - the first type; may be null
    `type2` - the second type; may be null
  Returns:
    the compatible type; never null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.