com.atlassian.greenhopper.manager
Interface RelatedEntityDao<PK,P extends Entity,T extends Entity,U>

All Known Implementing Classes:
BoardAdminDao, CardColorDao, ColumnDao, DetailViewFieldDao, EstimateStatisticDao, NonWorkingDayDao, QuickFilterDao, SubqueryDao, SwimlaneDao, TrackingStatisticDao, WorkingDaysDao

public interface RelatedEntityDao<PK,P extends Entity,T extends Entity,U>

A common interface for DAOs which handle an AO record T which has a relationship with parent record P.

Since:
v5.9.5

Method Summary
 void deleteForParent(P parent)
          Delete all records for specified parent.
 T[] getForParent(P parent)
          Return all the records for the specified parent.
 T[] getForParent(PK primaryKey)
          Return all the records for the specified parent.
 java.util.List<T> updateForParent(P parent, java.util.List<U> models)
          Set the list of domain objects onto the parent record.
 

Method Detail

getForParent

@NotNull
T[] getForParent(P parent)
Return all the records for the specified parent.

Parameters:
parent -
Returns:
the records

getForParent

@NotNull
T[] getForParent(PK primaryKey)
Return all the records for the specified parent.

Parameters:
primaryKey -
Returns:
the records

updateForParent

@NotNull
java.util.List<T> updateForParent(P parent,
                                          java.util.List<U> models)
Set the list of domain objects onto the parent record. This will create new or updated existing records as necessary.

Parameters:
parent -
models -
Returns:
the updated list of domain objects

deleteForParent

void deleteForParent(P parent)
Delete all records for specified parent.

Parameters:
parent -


Copyright © 2007-2013 Atlassian. All Rights Reserved.