Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*-
   * See the file LICENSE for redistribution information.
   *
   * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
   *
   */
  
  package com.sleepycat.persist.raw;
  
 import java.util.List;
 import java.util.Map;
 
The type definition for a simple or complex persistent type, or an array of persistent types.

RawType objects are thread-safe. Multiple threads may safely call the methods of a shared RawType object.

Author(s):
Mark Hayes
 
 public interface RawType {

    
Returns the class name for this type in the format specified by java.lang.Class.getName().

If this class currently exists (has not been removed or renamed) then the class name may be passed to java.lang.Class.forName(java.lang.String) to get the current java.lang.Class object. However, if this raw type is not the current version of the class, this type information may differ from that of the current java.lang.Class.

 
     String getClassName();

    
Returns the class version for this type. For simple types, zero is always returned.

 
     int getVersion();

    
Returns the internal unique ID for this type.
 
     int getId();

    
Returns whether this is a href="{@docRoot/com/sleepycat/persist/model/Entity.html#simpleTypes">simple type}: primitive, primitive wrapper, BigInteger, BigDecimal, String or Date.

If true is returned, isPrimitive() can be called for more information, and a raw value of this type is represented as a simple type object (not as a RawObject).

If false is returned, this is a complex type, an array type (see isArray()), or an enum type, and a raw value of this type is represented as a RawObject.

 
     boolean isSimple();

    
Returns whether this type is a Java primitive: char, byte, short, int, long, float or double.

If true is returned, this is also a simple type. In other words, primitive types are a subset of simple types.

If true is returned, a raw value of this type is represented as a non-null instance of the primitive type's wrapper class. For example, an int raw value is represented as an Integer.

 
     boolean isPrimitive();

    
Returns whether this is an enum type.

If true is returned, a value of this type is a RawObject and the enum constant String is available via RawObject.getEnum().

If false is returned, then this is a complex type, an array type (see isArray()), or a simple type (see isSimple()).

 
     boolean isEnum();

    
Returns an unmodifiable list of the names of the enum instances, or null if this is not an enum type.
 
     List<StringgetEnumConstants();

    
Returns whether this is an array type. Raw value arrays are represented as RawObject instances.

If true is returned, the array component type is returned by getComponentType() and the number of array dimensions is returned by getDimensions().

If false is returned, then this is a complex type, an enum type (see isEnum()), or a simple type (see isSimple()).

    boolean isArray();

    
Returns the number of array dimensions, or zero if this is not an array type.
    int getDimensions();

    
Returns the array component type, or null if this is not an array type.
    RawType getComponentType();

    
Returns a map of field name to raw field for each non-static non-transient field declared in this class, or null if this is not a complex type (in other words, this is a simple type or an array type).
    Map<StringRawFieldgetFields();

    
Returns the type of the superclass, or null if the superclass is Object or this is not a complex type (in other words, this is a simple type or an array type).
    RawType getSuperType();

    
Returns the original model class metadata used to create this class, or null if this is not a model class.
Returns the original model entity metadata used to create this class, or null if this is not an entity class.
Returns whether this type has been deleted using a class Deleter mutation. A deleted type may be returned by com.sleepycat.persist.model.EntityModel.getRawTypeVersion(java.lang.String,int) or com.sleepycat.persist.model.EntityModel.getAllRawTypeVersions(java.lang.String).
    boolean isDeleted();

    
Returns an XML representation of the raw type.
    String toString();
New to GrepCode? Check out our FAQ X