org.hypergraphdb.type.javaprimitive
Class StringType

java.lang.Object
  extended by org.hypergraphdb.type.javaprimitive.PrimitiveTypeBase<java.lang.String>
      extended by org.hypergraphdb.type.javaprimitive.StringType
All Implemented Interfaces:
java.util.Comparator<byte[]>, HGGraphHolder, HGOrderedSearchable<java.lang.String,HGPersistentHandle>, HGSearchable<java.lang.String,HGPersistentHandle>, ByteArrayConverter<java.lang.String>, HGAtomType, HGPrimitiveType<java.lang.String>

public final class StringType
extends PrimitiveTypeBase<java.lang.String>

The implementation of the primitive String type.

This implementation should be used only for relatively small strings, things like names or titles, since they are indexed and reference counted for lookup. If you want to store larger text data, including big documents, use the TextType instead.

A java.lang.String object is translated to a byte [] as follows:

Author:
Borislav Iordanov

Nested Class Summary
static class StringType.StringComparator
           
 
Field Summary
static java.lang.String INDEX_NAME
           
 
Constructor Summary
StringType()
           
 
Method Summary
 java.util.Comparator<byte[]> getComparator()
          Return a java.util.Comparator instance that provides an order relation of the values of the primitive type.
 
Methods inherited from class org.hypergraphdb.type.javaprimitive.PrimitiveTypeBase
compare, find, findGT, findGTE, findLT, findLTE, fromByteArray, getRefCountFor, make, release, setHyperGraph, store, subsumes, toByteArray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

INDEX_NAME

public static final java.lang.String INDEX_NAME
See Also:
Constant Field Values
Constructor Detail

StringType

public StringType()
Method Detail

getComparator

public java.util.Comparator<byte[]> getComparator()
Description copied from interface: HGPrimitiveType
Return a java.util.Comparator instance that provides an order relation of the values of the primitive type. An implementation is allowed to return null in which case it is assumed that the type does not offer an ordering relation. However, if a non-null value is returned, it is must be of a publicly available and default constructible class.