ome.tools.hibernate
Class SqlArray<T>

java.lang.Object
  extended by ome.tools.hibernate.SqlArray<T>
All Implemented Interfaces:
Array
Direct Known Subclasses:
SqlArray.BOOLEAN, SqlArray.DATE, SqlArray.DOUBLE, SqlArray.FLOAT, SqlArray.INTEGER, SqlArray.STRING, SqlArray.STRING2

public class SqlArray<T>
extends Object
implements Array

Hibernate type to store a java array using SQL ARRAY.

Author:
Sylvain References : http://forum.hibernate.org/viewtopic.php?t=946973 http://archives.postgresql.org/pgsql-jdbc/2003-02/msg00141.php

Nested Class Summary
static class SqlArray.BOOLEAN
           
static class SqlArray.DATE
           
static class SqlArray.DOUBLE
           
static class SqlArray.FLOAT
           
static class SqlArray.INTEGER
           
static class SqlArray.STRING
           
static class SqlArray.STRING2
           
 
Field Summary
static ListAsSQLArrayUserType.ArrayFactory FACTORY
           
 
Constructor Summary
protected SqlArray(List<T> data, int baseType)
           
protected SqlArray(List<T> data, int baseType, String baseTypeName)
           
 
Method Summary
protected  void appendDate(StringBuilder sb, Date date)
           
 void free()
           
 Object getArray()
           
 Object getArray(long index, int count)
           
 Object getArray(long arg0, int arg1, Map<String,Class<?>> arg2)
           
 Object getArray(Map<String,Class<?>> arg0)
           
 int getBaseType()
           
 String getBaseTypeName()
           
 ResultSet getResultSet()
           
 ResultSet getResultSet(long index, int count)
           
 ResultSet getResultSet(long arg0, int arg1, Map<String,Class<?>> arg2)
           
 ResultSet getResultSet(Map<String,Class<?>> arg0)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FACTORY

public static final ListAsSQLArrayUserType.ArrayFactory FACTORY
Constructor Detail

SqlArray

protected SqlArray(List<T> data,
                   int baseType)

SqlArray

protected SqlArray(List<T> data,
                   int baseType,
                   String baseTypeName)
Method Detail

getBaseTypeName

public String getBaseTypeName()
Specified by:
getBaseTypeName in interface Array

getBaseType

public int getBaseType()
Specified by:
getBaseType in interface Array

getArray

public Object getArray()
Specified by:
getArray in interface Array

getArray

public Object getArray(long index,
                       int count)
Specified by:
getArray in interface Array

getArray

public Object getArray(Map<String,Class<?>> arg0)
Specified by:
getArray in interface Array

getArray

public Object getArray(long arg0,
                       int arg1,
                       Map<String,Class<?>> arg2)
Specified by:
getArray in interface Array

getResultSet

public ResultSet getResultSet()
Specified by:
getResultSet in interface Array

getResultSet

public ResultSet getResultSet(Map<String,Class<?>> arg0)
Specified by:
getResultSet in interface Array

getResultSet

public ResultSet getResultSet(long index,
                              int count)
Specified by:
getResultSet in interface Array

getResultSet

public ResultSet getResultSet(long arg0,
                              int arg1,
                              Map<String,Class<?>> arg2)
Specified by:
getResultSet in interface Array

free

public void free()
Specified by:
free in interface Array

toString

public String toString()
Overrides:
toString in class Object

appendDate

protected void appendDate(StringBuilder sb,
                          Date date)


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.