@Test public void testIsOld() { File file = mock(File.class); when(file.lastModified()).thenReturn(1000L); cgenConfiguration.setTimestamp(0); assertTrue(action.isOld(file)); cgenConfiguration.setTimestamp(2000L); assertFalse(action.isOld(file)); }
protected boolean isOld(File file) { return file.lastModified() > cgenConfiguration.getTimestamp(); }
ClassGenerationAction { protected boolean isOld(File file) { return file.lastModified() > cgenConfiguration.getTimestamp(); } }
ClassGenerationAction { protected boolean isOld(File file) { return file.lastModified() > cgenConfiguration.getTimestamp(); } ClassGenerationAction(CgenConfiguration cgenConfig); }
ClassGenerationAction { protected boolean isOld(File file) { return file.lastModified() > cgenConfiguration.getTimestamp(); } ClassGenerationAction(CgenConfiguration cgenConfig); String defaultTemplateName(TemplateType type); String customTemplateName(TemplateType type); void resetContextForArtifact(Artifact artifact); void addEntities(Collection<ObjEntity> entities); void addEmbeddables(Collection<Embeddable> embeddables); void addQueries(Collection<QueryDescriptor> queries); void prepareArtifacts(); void execute(); void setLogger(Logger logger); CgenConfiguration getCgenConfiguration(); void setContext(Context context); void setCgenConfiguration(CgenConfiguration cgenConfiguration); ToolsUtilsFactory getUtilsFactory(); void setUtilsFactory(ToolsUtilsFactory utilsFactory); void setMetadataUtils(MetadataUtils metadataUtils); MetadataUtils getMetadataUtils(); }
ClassGenerationAction { protected boolean isOld(File file) { return file.lastModified() > cgenConfiguration.getTimestamp(); } ClassGenerationAction(CgenConfiguration cgenConfig); String defaultTemplateName(TemplateType type); String customTemplateName(TemplateType type); void resetContextForArtifact(Artifact artifact); void addEntities(Collection<ObjEntity> entities); void addEmbeddables(Collection<Embeddable> embeddables); void addQueries(Collection<QueryDescriptor> queries); void prepareArtifacts(); void execute(); void setLogger(Logger logger); CgenConfiguration getCgenConfiguration(); void setContext(Context context); void setCgenConfiguration(CgenConfiguration cgenConfiguration); ToolsUtilsFactory getUtilsFactory(); void setUtilsFactory(ToolsUtilsFactory utilsFactory); void setMetadataUtils(MetadataUtils metadataUtils); MetadataUtils getMetadataUtils(); static final String SINGLE_CLASS_TEMPLATE; static final String SUBCLASS_TEMPLATE; static final String SUPERCLASS_TEMPLATE; static final String EMBEDDABLE_SINGLE_CLASS_TEMPLATE; static final String EMBEDDABLE_SUBCLASS_TEMPLATE; static final String EMBEDDABLE_SUPERCLASS_TEMPLATE; static final String DATAMAP_SINGLE_CLASS_TEMPLATE; static final String DATAMAP_SUBCLASS_TEMPLATE; static final String DATAMAP_SUPERCLASS_TEMPLATE; static final String SUPERCLASS_PREFIX; }