@Test public void testFind() throws Exception { int id = wi.getID(); WorkspaceItem found = WorkspaceItem.find(context, id); assertThat("testFind 0",found,notNullValue()); assertThat("testFind 1",found.getID(), equalTo(id)); assertThat("testFind 2",found, equalTo(wi)); assertThat("testFind 3",found.getCollection(),equalTo(wi.getCollection())); }
public static WorkspaceItem find(Context context, int id) throws SQLException { WorkspaceItem fromCache = (WorkspaceItem) context.fromCache( WorkspaceItem.class, id); if (fromCache != null) { return fromCache; } TableRow row = DatabaseManager.find(context, "workspaceitem", id); if (row == null) { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "not_found,workspace_item_id=" + id)); } return null; } else { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "workspace_item_id=" + id)); } return new WorkspaceItem(context, row); } }
WorkspaceItem implements InProgressSubmission { public static WorkspaceItem find(Context context, int id) throws SQLException { WorkspaceItem fromCache = (WorkspaceItem) context.fromCache( WorkspaceItem.class, id); if (fromCache != null) { return fromCache; } TableRow row = DatabaseManager.find(context, "workspaceitem", id); if (row == null) { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "not_found,workspace_item_id=" + id)); } return null; } else { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "workspace_item_id=" + id)); } return new WorkspaceItem(context, row); } } }
WorkspaceItem implements InProgressSubmission { public static WorkspaceItem find(Context context, int id) throws SQLException { WorkspaceItem fromCache = (WorkspaceItem) context.fromCache( WorkspaceItem.class, id); if (fromCache != null) { return fromCache; } TableRow row = DatabaseManager.find(context, "workspaceitem", id); if (row == null) { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "not_found,workspace_item_id=" + id)); } return null; } else { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "workspace_item_id=" + id)); } return new WorkspaceItem(context, row); } } WorkspaceItem(Context context, TableRow row); }
WorkspaceItem implements InProgressSubmission { public static WorkspaceItem find(Context context, int id) throws SQLException { WorkspaceItem fromCache = (WorkspaceItem) context.fromCache( WorkspaceItem.class, id); if (fromCache != null) { return fromCache; } TableRow row = DatabaseManager.find(context, "workspaceitem", id); if (row == null) { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "not_found,workspace_item_id=" + id)); } return null; } else { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "workspace_item_id=" + id)); } return new WorkspaceItem(context, row); } } WorkspaceItem(Context context, TableRow row); static WorkspaceItem find(Context context, int id); static WorkspaceItem create(Context c, Collection coll,
            boolean template); static WorkspaceItem[] findByEPerson(Context context, EPerson ep); static WorkspaceItem[] findByCollection(Context context, Collection c); static WorkspaceItem findByItem(Context context, Item i); static WorkspaceItem[] findAll(Context context); int getID(); int getStageReached(); void setStageReached(int v); int getPageReached(); void setPageReached(int v); void update(); boolean equals(Object o); int hashCode(); void deleteAll(); void deleteWrapper(); Item getItem(); Collection getCollection(); EPerson getSubmitter(); boolean hasMultipleFiles(); void setMultipleFiles(boolean b); boolean hasMultipleTitles(); void setMultipleTitles(boolean b); boolean isPublishedBefore(); void setPublishedBefore(boolean b); }
WorkspaceItem implements InProgressSubmission { public static WorkspaceItem find(Context context, int id) throws SQLException { WorkspaceItem fromCache = (WorkspaceItem) context.fromCache( WorkspaceItem.class, id); if (fromCache != null) { return fromCache; } TableRow row = DatabaseManager.find(context, "workspaceitem", id); if (row == null) { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "not_found,workspace_item_id=" + id)); } return null; } else { if (log.isDebugEnabled()) { log.debug(LogManager.getHeader(context, "find_workspace_item", "workspace_item_id=" + id)); } return new WorkspaceItem(context, row); } } WorkspaceItem(Context context, TableRow row); static WorkspaceItem find(Context context, int id); static WorkspaceItem create(Context c, Collection coll,
            boolean template); static WorkspaceItem[] findByEPerson(Context context, EPerson ep); static WorkspaceItem[] findByCollection(Context context, Collection c); static WorkspaceItem findByItem(Context context, Item i); static WorkspaceItem[] findAll(Context context); int getID(); int getStageReached(); void setStageReached(int v); int getPageReached(); void setPageReached(int v); void update(); boolean equals(Object o); int hashCode(); void deleteAll(); void deleteWrapper(); Item getItem(); Collection getCollection(); EPerson getSubmitter(); boolean hasMultipleFiles(); void setMultipleFiles(boolean b); boolean hasMultipleTitles(); void setMultipleTitles(boolean b); boolean isPublishedBefore(); void setPublishedBefore(boolean b);  }