/** * Check that the list dao is configured * * @throws ListServiceException * if the dao is still null */ protected final void checkDao() throws ListServiceException { if (listDao == null) { throw new ListServiceException("ListDao not initialized, list " + "service operations are not available"); } }
/** * Check that the list dao is configured * * @throws ListServiceException * if the dao is still null */ protected final void checkDao() throws ListServiceException { if (listDao == null) { throw new ListServiceException("ListDao not initialized, list " + "service operations are not available"); } }
/** * Check that the list dao is configured * * @throws ListServiceException * if the dao is still null */ protected final void checkDao() throws ListServiceException { if (listDao == null) { throw new ListServiceException("ListDao not initialized, list " + "service operations are not available"); } }
/** * Check that the t2reference generator is configured * * @throws ListServiceException * if the generator is still null */ protected final void checkGenerator() throws ListServiceException { if (t2ReferenceGenerator == null) { throw new ListServiceException( "T2ReferenceGenerator not initialized, list " + "service operations not available"); } }
/** * Check that the t2reference generator is configured * * @throws ListServiceException * if the generator is still null */ protected final void checkGenerator() throws ListServiceException { if (t2ReferenceGenerator == null) { throw new ListServiceException( "T2ReferenceGenerator not initialized, list " + "service operations not available"); } }
/** * Check that the t2reference generator is configured * * @throws ListServiceException * if the generator is still null */ protected final void checkGenerator() throws ListServiceException { if (t2ReferenceGenerator == null) { throw new ListServiceException( "T2ReferenceGenerator not initialized, list " + "service operations not available"); } }
public IdentifiedList<T2Reference> getList(T2Reference id) throws ListServiceException { checkDao(); try { return listDao.get(id); } catch (DaoException de) { throw new ListServiceException(de); } }
public IdentifiedList<T2Reference> getList(T2Reference id) throws ListServiceException { checkDao(); try { return listDao.get(id); } catch (DaoException de) { throw new ListServiceException(de); } }
public IdentifiedList<T2Reference> getList(T2Reference id) throws ListServiceException { checkDao(); try { return listDao.get(id); } 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); } }
checkGenerator(); if (items.isEmpty()) { throw new ListServiceException( "Can't register an empty list with this method," + " use the registerEmptyList instead"); throw new ListServiceException("Can't register list of depth less than 1, but first item " + items.get(0) + " has depth " + depth); for (T2Reference ref : items) { if (ref.getDepth() != depth) { throw new ListServiceException( "Mismatched depths in list registration; reference at index '" + counter + "' has depth " + ref.getDepth() return newList; } catch (Throwable t) { throw new ListServiceException(t);
checkGenerator(); if (items.isEmpty()) { throw new ListServiceException( "Can't register an empty list with this method," + " use the registerEmptyList instead"); for (T2Reference ref : items) { if (ref.getDepth() != depth) { throw new ListServiceException( "Mismatched depths in list registration; reference at index '" + counter + "' has depth " + ref.getDepth() return newList; } catch (Throwable t) { throw new ListServiceException(t);
context = EmptyReferenceContext.checkContext(context); if (items.isEmpty()) { throw new ListServiceException( "Can't register an empty list with this method," + " use the registerEmptyList instead"); for (T2Reference ref : items) { if (ref.getDepth() != depth) { throw new ListServiceException( "Mismatched depths in list registration; reference at index '" + counter + "' has depth " + ref.getDepth() return newList; } catch (Throwable t) { throw new ListServiceException(t);
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 { 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); } }