Package ome.services.db
Class DatabaseIdentity
- java.lang.Object
-
- ome.services.db.DatabaseIdentity
-
public class DatabaseIdentity extends java.lang.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
Constructors Constructor Description DatabaseIdentity(java.lang.String authority, java.lang.String uuid)
DatabaseIdentity(java.lang.String authority, ome.util.SqlAction sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthority()
java.lang.String
getUuid()
java.lang.String
lsid(java.lang.Class k, long id)
java.lang.String
lsid(java.lang.Class k, long id, long version)
java.lang.String
lsid(java.lang.String ns, java.lang.String id)
java.lang.String
lsid(java.lang.String ns, java.lang.String id, java.lang.String version)
boolean
own(java.lang.String lsid)
boolean
valid(java.lang.String lsid)
-
-
-
Method Detail
-
getAuthority
public java.lang.String getAuthority()
-
getUuid
public java.lang.String getUuid()
-
valid
public boolean valid(java.lang.String lsid)
-
own
public boolean own(java.lang.String lsid)
-
lsid
public java.lang.String lsid(java.lang.Class k, long id)
-
lsid
public java.lang.String lsid(java.lang.Class k, long id, long version)
-
lsid
public java.lang.String lsid(java.lang.String ns, java.lang.String id)
-
lsid
public java.lang.String lsid(java.lang.String ns, java.lang.String id, java.lang.String version)
-
-