예제 #1
0
파일: JdoDao.java 프로젝트: remtcs/dcache
 @Override
 @Transactional(readOnly = true)
 public Collection<Pin> getPins(PnfsId pnfsId) {
   PersistenceManager pm = _pmf.getPersistenceManager();
   Query query = pm.newQuery(Pin.class, "_pnfsId == :pnfsId");
   Collection<Pin> pins = (Collection<Pin>) query.execute(pnfsId.toString());
   return pm.detachCopyAll(pins);
 }
예제 #2
0
파일: JdoDao.java 프로젝트: remtcs/dcache
 @Override
 @Transactional(readOnly = true)
 public Pin getPin(PnfsId pnfsId, String requestId) {
   PersistenceManager pm = _pmf.getPersistenceManager();
   Query query = pm.newQuery(Pin.class, "_pnfsId == :pnfsId && _requestId == :requestId");
   query.setUnique(true);
   Pin pin = (Pin) query.execute(pnfsId.toString(), requestId);
   return (pin == null) ? null : pm.detachCopy(pin);
 }
예제 #3
0
파일: JdoDao.java 프로젝트: remtcs/dcache
 @Override
 @Transactional
 public void deletePin(PnfsId pnfsId) {
   PersistenceManager pm = _pmf.getPersistenceManager();
   pm.newQuery(Pin.class, "_pnfsId == :pnfsId").deletePersistentAll(pnfsId.toString());
 }
예제 #4
0
 private String toImageName(PnfsId id) {
   return id.toString();
 }