summaryrefslogtreecommitdiffstats
path: root/proxy/code/src/org
diff options
context:
space:
mode:
authorDmitri Dolguikh <ddolguik@redhat.com>2009-12-07 14:36:43 -0400
committerDmitri Dolguikh <ddolguik@redhat.com>2009-12-07 14:36:43 -0400
commit54df7918e39b05172dd9789d170222e72f1715a3 (patch)
treec14be1bbcd3fa6263eb64a3b87f254171d8969ac /proxy/code/src/org
parentb7b8136ab275042b5b69ccb2558a89bd0a15f635 (diff)
downloadcandlepin-54df7918e39b05172dd9789d170222e72f1715a3.tar.gz
candlepin-54df7918e39b05172dd9789d170222e72f1715a3.tar.xz
candlepin-54df7918e39b05172dd9789d170222e72f1715a3.zip
added curator class for Owner modelmaster
Diffstat (limited to 'proxy/code/src/org')
-rw-r--r--proxy/code/src/org/fedoraproject/candlepin/model/OwnerCurator.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/proxy/code/src/org/fedoraproject/candlepin/model/OwnerCurator.java b/proxy/code/src/org/fedoraproject/candlepin/model/OwnerCurator.java
new file mode 100644
index 0000000..d76a9d3
--- /dev/null
+++ b/proxy/code/src/org/fedoraproject/candlepin/model/OwnerCurator.java
@@ -0,0 +1,16 @@
+package org.fedoraproject.candlepin.model;
+
+import org.hibernate.criterion.Restrictions;
+
+public class OwnerCurator extends AbstractHibernateRepository<Owner> {
+
+ protected OwnerCurator() {
+ super(Owner.class);
+ }
+
+ public Owner lookupByName(String name) {
+ return (Owner) currentSession().createCriteria(Owner.class)
+ .add(Restrictions.like("name", name))
+ .uniqueResult();
+ }
+}