ome.services.db
Class PgArrayHelper

java.lang.Object
  extended by ome.services.db.PgArrayHelper

public class PgArrayHelper
extends Object

Strategy class for setting array values in the database. Must be used from within an existing transaction.


Constructor Summary
PgArrayHelper(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc)
           
 
Method Summary
 List<String> getFileParamKeys(long id)
          Returns only the (possibly empty) keys which are set on the given original file.
 Map<String,String> getFileParams(long id)
          Loads all the (possibly empty) params for the given original file.
 List<String> getPixelsParamKeys(long id)
          Returns only the (possibly empty) keys which are set on the given original file.
 Map<String,String> getPixelsParams(long id)
          Loads all the (possibly empty) params for the given original file.
 int setFileParam(long id, String key, String value)
          Appends "{key, value}" onto the original file "params" field or replaces the value if already present.
 int setFileParams(long id, Map<String,String> params)
          Resets the entire original file "params" field.
 int setPixelsParam(long id, String key, String value)
          Appends "{key, value}" onto the original file "params" field or replaces the value if already present.
 int setPixelsParams(long id, Map<String,String> params)
          Resets the entire original file "params" field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PgArrayHelper

public PgArrayHelper(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc)
Method Detail

setFileParam

public int setFileParam(long id,
                        String key,
                        String value)
Appends "{key, value}" onto the original file "params" field or replaces the value if already present.


setFileParams

public int setFileParams(long id,
                         Map<String,String> params)
Resets the entire original file "params" field.


getFileParams

public Map<String,String> getFileParams(long id)
                                 throws ome.conditions.InternalException
Loads all the (possibly empty) params for the given original file. If the id is not found, null is returned.

Throws:
ome.conditions.InternalException

getFileParamKeys

public List<String> getFileParamKeys(long id)
                              throws ome.conditions.InternalException
Returns only the (possibly empty) keys which are set on the given original file. If the given original file cannot be found, null is returned.

Throws:
ome.conditions.InternalException

setPixelsParam

public int setPixelsParam(long id,
                          String key,
                          String value)
Appends "{key, value}" onto the original file "params" field or replaces the value if already present.


setPixelsParams

public int setPixelsParams(long id,
                           Map<String,String> params)
Resets the entire original file "params" field.


getPixelsParams

public Map<String,String> getPixelsParams(long id)
                                   throws ome.conditions.InternalException
Loads all the (possibly empty) params for the given original file. If the id is not found, null is returned.

Throws:
ome.conditions.InternalException

getPixelsParamKeys

public List<String> getPixelsParamKeys(long id)
                                throws ome.conditions.InternalException
Returns only the (possibly empty) keys which are set on the given original file. If the given original file cannot be found, null is returned.

Throws:
ome.conditions.InternalException


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

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