ome.services.db
Class DatabaseIdentity

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

public class DatabaseIdentity
extends Object

Represents the unique identity of this database, consisting of the omero.db.authority and omero.db.uuid properties. Used primarily to fulfill the LSID contract of globally unique identifiers. On database initialization:

   bin/omero db script
   psql my_database < script
 

a UUID is added to the "configuration" table with the key "omero.db.uuid". This value will be used in all objects exported from this database, so that they can be cleanly re-imported. This implies that it is not safe to copy a database and use it actively while the original database is still running. Only use database copies (or "dumps") as a backup in case of catastrophic failure. A default authority of "export.openmicroscopy.org" is used to simplify initial configuration, but you are welcome to use a domain belonging to you as the authority. If you choose to do so, you will need to use the same authority on any host which you may happen to migrate your database to.


Constructor Summary
DatabaseIdentity(String authority, org.springframework.jdbc.core.simple.SimpleJdbcTemplate jdbc)
           
DatabaseIdentity(String authority, String uuid)
           
 
Method Summary
 String getAuthority()
           
 String getUuid()
           
 String lsid(Class k, long id)
           
 String lsid(Class k, long id, long version)
           
 String lsid(String ns, String id)
           
 String lsid(String ns, String id, String version)
           
 boolean own(String lsid)
           
 boolean valid(String lsid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseIdentity

public DatabaseIdentity(String authority,
                        org.springframework.jdbc.core.simple.SimpleJdbcTemplate jdbc)

DatabaseIdentity

public DatabaseIdentity(String authority,
                        String uuid)
Method Detail

getAuthority

public String getAuthority()

getUuid

public String getUuid()

valid

public boolean valid(String lsid)

own

public boolean own(String lsid)

lsid

public String lsid(Class k,
                   long id)

lsid

public String lsid(Class k,
                   long id,
                   long version)

lsid

public String lsid(String ns,
                   String id)

lsid

public String lsid(String ns,
                   String id,
                   String version)


OmeroJava Api

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

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