@Test public void getNextId() { GanttTaskImpl root = new GanttTaskImpl(); root.addChild(new GanttTaskImpl(5)); assertEquals(-1, root.getNextId()); root.addChild(new GanttTaskImpl(-1)); assertEquals(-2, root.getNextId()); root.addChild(new GanttTaskImpl(-5)); assertEquals(-6, root.getNextId()); root.addChild(new GanttTaskImpl(-6)); assertEquals(-7, root.getNextId()); }
public int getNextId() { final Integer id = getNextId(this, -1); return id != null ? id : -1; }
GanttTaskImpl implements GanttTask, Serializable { public int getNextId() { final Integer id = getNextId(this, -1); return id != null ? id : -1; } }
GanttTaskImpl implements GanttTask, Serializable { public int getNextId() { final Integer id = getNextId(this, -1); return id != null ? id : -1; } GanttTaskImpl();  GanttTaskImpl(final Integer id); }
GanttTaskImpl implements GanttTask, Serializable { public int getNextId() { final Integer id = getNextId(this, -1); return id != null ? id : -1; } GanttTaskImpl();  GanttTaskImpl(final Integer id); @Override Serializable getId(); @Override GanttTaskImpl setId(final Serializable id); @Override Integer getPredecessorOffset(); @Override GanttTaskImpl setPredecessorOffset(final Integer predecessorOffset); @Override GanttRelationType getRelationType(); @Override GanttTaskImpl setRelationType(GanttRelationType relationType); @Override GanttTask getPredecessor(); @Override GanttTaskImpl setPredecessor(GanttTask predecessor); @Override Serializable getPredecessorId(); @Override String getDescription(); GanttTaskImpl setDescription(String description); @Override BigDecimal getDuration(); @Override GanttTaskImpl setDuration(final BigDecimal duration); @Override LocalDate getEndDate(); @Override GanttTaskImpl setEndDate(LocalDate endDate); @Override LocalDate getStartDate(); @Override GanttTaskImpl setStartDate(LocalDate startDate); @Override String getTitle(); @Override GanttTaskImpl setTitle(String title); @Override GanttObjectType getType(); @Override GanttTaskImpl setType(GanttObjectType type); @Override String getWorkpackageCode(); GanttTaskImpl setWorkpackageCode(String workpackageCode); @Override List<GanttTask> getChildren(); @Override void sortChildren(); @Override GanttTaskImpl addChild(final GanttTask child); @Override void removeChild(final GanttTask ganttObject); @Override boolean hasDuration(); @Override LocalDate getCalculatedStartDate(); @Override GanttTaskImpl setCalculatedStartDate(LocalDate calculatedStartDate); @Override LocalDate getCalculatedEndDate(); @Override GanttTaskImpl setCalculatedEndDate(LocalDate calculatedEndDate); @Override boolean isStartDateCalculated(); @Override GanttTaskImpl setStartDateCalculated(boolean startDateCalculated); @Override boolean isEndDateCalculated(); @Override GanttTaskImpl setEndDateCalculated(boolean isEndDateCalculated); @Override boolean isVisible(); @Override GanttTask setVisible(boolean visible); GanttTaskImpl setInvisible(); @Override Integer getProgress(); @Override GanttTaskImpl setProgress(Integer progress); @Override GanttTaskImpl recalculate(); boolean checkCyclicReferences(); @Override String toString(); @Override GanttTask findBy(final Matcher<GanttTask> matcher, final Object expression); @Override GanttTask findById(final Serializable id); @Override GanttTask findByTitle(final String title); @Override GanttTask findByWorkpackageCode(String workpackageCode); @Override GanttTask findParent(final Serializable id); int getNextId(); }
GanttTaskImpl implements GanttTask, Serializable { public int getNextId() { final Integer id = getNextId(this, -1); return id != null ? id : -1; } GanttTaskImpl();  GanttTaskImpl(final Integer id); @Override Serializable getId(); @Override GanttTaskImpl setId(final Serializable id); @Override Integer getPredecessorOffset(); @Override GanttTaskImpl setPredecessorOffset(final Integer predecessorOffset); @Override GanttRelationType getRelationType(); @Override GanttTaskImpl setRelationType(GanttRelationType relationType); @Override GanttTask getPredecessor(); @Override GanttTaskImpl setPredecessor(GanttTask predecessor); @Override Serializable getPredecessorId(); @Override String getDescription(); GanttTaskImpl setDescription(String description); @Override BigDecimal getDuration(); @Override GanttTaskImpl setDuration(final BigDecimal duration); @Override LocalDate getEndDate(); @Override GanttTaskImpl setEndDate(LocalDate endDate); @Override LocalDate getStartDate(); @Override GanttTaskImpl setStartDate(LocalDate startDate); @Override String getTitle(); @Override GanttTaskImpl setTitle(String title); @Override GanttObjectType getType(); @Override GanttTaskImpl setType(GanttObjectType type); @Override String getWorkpackageCode(); GanttTaskImpl setWorkpackageCode(String workpackageCode); @Override List<GanttTask> getChildren(); @Override void sortChildren(); @Override GanttTaskImpl addChild(final GanttTask child); @Override void removeChild(final GanttTask ganttObject); @Override boolean hasDuration(); @Override LocalDate getCalculatedStartDate(); @Override GanttTaskImpl setCalculatedStartDate(LocalDate calculatedStartDate); @Override LocalDate getCalculatedEndDate(); @Override GanttTaskImpl setCalculatedEndDate(LocalDate calculatedEndDate); @Override boolean isStartDateCalculated(); @Override GanttTaskImpl setStartDateCalculated(boolean startDateCalculated); @Override boolean isEndDateCalculated(); @Override GanttTaskImpl setEndDateCalculated(boolean isEndDateCalculated); @Override boolean isVisible(); @Override GanttTask setVisible(boolean visible); GanttTaskImpl setInvisible(); @Override Integer getProgress(); @Override GanttTaskImpl setProgress(Integer progress); @Override GanttTaskImpl recalculate(); boolean checkCyclicReferences(); @Override String toString(); @Override GanttTask findBy(final Matcher<GanttTask> matcher, final Object expression); @Override GanttTask findById(final Serializable id); @Override GanttTask findByTitle(final String title); @Override GanttTask findByWorkpackageCode(String workpackageCode); @Override GanttTask findParent(final Serializable id); int getNextId(); static int MAX_DEPTH; }