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

## net.java.ao.types
Class DatabaseType<T>

    java.lang.Object
      net.java.ao.types.DatabaseType<T>

    public abstract class DatabaseType<T>

extends Object

Author:
  Daniel Spiewak

Constructor Summary
`protected` | `DatabaseType(int type, int defaultPrecision, Class<?>... handledTypes)`

Method Summary
`abstract Object` | `defaultParseValue(String value)`
`boolean` | `equals(Object obj)`
`abstract String` | `getDefaultName()`
`int` | `getDefaultPrecision()`
`int` | `getType()`
`int` | `hashCode()`
`boolean` | `isHandlerFor(Class<?> type)`
`boolean` | `isHandlerFor(int type)`
`T` | `pullFromDatabase(EntityManager manager, ResultSet res, Class<? extends T> type, int index)`
`abstract T` | `pullFromDatabase(EntityManager manager, ResultSet res, Class<? extends T> type, String field)`
`void` | `putToDatabase(EntityManager manager, PreparedStatement stmt, int index, T value)`
`boolean` | `shouldCache(Class<?> type)`
`String` | `toString()`
`boolean` | `valueEquals(Object val1, Object val2)`
`String` | `valueToString(Object value)`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DatabaseType

    protected DatabaseType(int type,
                           int defaultPrecision,
                           Class<?>... handledTypes)

Method Detail

### getType

    public int getType()

### getDefaultPrecision

    public int getDefaultPrecision()

### isHandlerFor

    public boolean isHandlerFor(int type)

### isHandlerFor

    public boolean isHandlerFor(Class<?> type)

### shouldCache

    public boolean shouldCache(Class<?> type)

### putToDatabase

    public void putToDatabase(EntityManager manager,
                              PreparedStatement stmt,
                              int index,
                              T value)
                       throws SQLException

  Throws:
    `SQLException`

### valueEquals

    public boolean valueEquals(Object val1,
                               Object val2)

### getDefaultName

    public abstract String getDefaultName()

### pullFromDatabase

    public abstract T pullFromDatabase(EntityManager manager,
                                       ResultSet res,
                                       Class<? extends T> type,
                                       String field)
                                throws SQLException

  Throws:
    `SQLException`

### pullFromDatabase

    public T pullFromDatabase(EntityManager manager,
                              ResultSet res,
                              Class<? extends T> type,
                              int index)
                       throws SQLException

  Throws:
    `SQLException`

### defaultParseValue

    public abstract Object defaultParseValue(String value)

### valueToString

    public String valueToString(Object value)

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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

Copyright © 2007-2011. All Rights Reserved.