public IdentifiedList<T2Reference> registerEmptyList(int depth) throws ListServiceException { checkDao(); checkGenerator(); T2ReferenceImpl newReference = T2ReferenceImpl .getAsImpl(t2ReferenceGenerator.nextListReference(false, depth)); T2ReferenceListImpl newList = new T2ReferenceListImpl(); newList.setTypedId(newReference); try { listDao.store(newList); return newList; } catch (DaoException de) { throw new ListServiceException(de); } }
public IdentifiedList<T2Reference> registerEmptyList(int depth, ReferenceContext context) throws ListServiceException { if (depth < 1) { throw new ListServiceException("Can't register empty lists of depth " + depth); } checkDao(); checkGenerator(); T2ReferenceImpl newReference = T2ReferenceImpl .getAsImpl(t2ReferenceGenerator.nextListReference(false, depth, context)); T2ReferenceListImpl newList = new T2ReferenceListImpl(); newList.setTypedId(newReference); try { listDao.store(newList); return newList; } catch (DaoException de) { throw new ListServiceException(de); } }
public IdentifiedList<T2Reference> registerEmptyList(int depth, ReferenceContext context) throws ListServiceException { checkDao(); checkGenerator(); context = EmptyReferenceContext.checkContext(context); T2ReferenceImpl newReference = T2ReferenceImpl.getAsImpl(getGenerator( context).nextListReference(false, depth)); T2ReferenceListImpl newList = new T2ReferenceListImpl(); newList.setTypedId(newReference); try { listDao.store(newList); return newList; } catch (DaoException de) { throw new ListServiceException(de); } }
throw new ListServiceException("Can't register list of depth less than 1, but first item " + items.get(0) + " has depth " + depth); T2ReferenceListImpl newList = new T2ReferenceListImpl(); int counter = 0; for (T2Reference ref : items) {
T2ReferenceListImpl newList = new T2ReferenceListImpl(); int counter = 0; for (T2Reference ref : items) {
T2ReferenceListImpl newList = new T2ReferenceListImpl(); int counter = 0; for (T2Reference ref : items) {
listReference.setReferenceType(T2ReferenceType.IdentifiedList); T2ReferenceListImpl l = new T2ReferenceListImpl();
listReference.setReferenceType(T2ReferenceType.IdentifiedList); T2ReferenceListImpl l = new T2ReferenceListImpl();