@Override public List<RestBoardDimension> getRestDimensions(Strips strips) { ArrayList<RestBoardDimension> dimensions = new ArrayList<RestBoardDimension>(); for (Segment segment : strips.getItems()) { if (segment.getElements().length > 0) { StorageElementLink storageElementLink = FacadeContext.getBoardFacade().getStorageElementLinkBy(segment); Board board = storageElementLink != null ? (Board) storageElementLink.getStoreElement() : ((SheetDimentionItem) segment.getDimensionItem()).getBoard(); dimensions.addAll(getFreeDimensions(board, segment)); } } return dimensions; }
public static void main(String[] args) { new SpringConfiguration(); FacadeContext.getBoardFacade().findBy(54621L); HibernateInterceptor hibernateInterceptor = (HibernateInterceptor) FacadeContext.getApplicationContext().getBean("hibernateInterceptor"); Session session = hibernateInterceptor.getSessionFactory().openSession(); updateBordersDef(session); updateBoardDef(session); updateTexture(session); updateService(session); updateFurnitureLink(session); updateAdditional(session); updateBOARD(session); updateBORDER(session); session.close(); }