org.squashtest.csp.tm.internal.repository
Interface CustomFieldDao

All Superinterfaces:
CustomCustomFieldDao

public interface CustomFieldDao
extends CustomCustomFieldDao


Method Summary
 long countCustomFields()
          Will count all existing custom fields
 List<CustomField> findAll()
           
 List<CustomField> findAllBindableCustomFields(Long projectId, BindableEntity bindableEntity)
          Will return the list of custom fields that can be bound to the given project and the given bindable entity (ie, those who aren't bound yet).
 List<CustomField> findAllOrderedByName()
          Will find all custom fields and return them ordered by their name.
 CustomField findByCode(String code)
          Will find the CustomField having a code value matching the parameter.
 CustomField findById(long id)
           
 CustomField findByName(String name)
          Returns the field matching the name if it exists.
 void persist(CustomField customField)
           
 void remove(CustomField customField)
           
 
Methods inherited from interface org.squashtest.csp.tm.internal.repository.CustomCustomFieldDao
findSingleSelectFieldById, findSortedCustomFields
 

Method Detail

findAll

List<CustomField> findAll()

findAllBindableCustomFields

List<CustomField> findAllBindableCustomFields(Long projectId,
                                              BindableEntity bindableEntity)
Will return the list of custom fields that can be bound to the given project and the given bindable entity (ie, those who aren't bound yet).

Parameters:
projectId -
bindableEntity -
Returns:

persist

void persist(CustomField customField)

findById

CustomField findById(long id)

remove

void remove(CustomField customField)

findByName

CustomField findByName(@NotNull
                       String name)
Returns the field matching the name if it exists.

Parameters:
name -
Returns:

findAllOrderedByName

List<CustomField> findAllOrderedByName()
Will find all custom fields and return them ordered by their name.

Returns:
the list of all existing CustomField ordered by CustomField.getName()

countCustomFields

long countCustomFields()
Will count all existing custom fields

Returns:
the number of custom fields

findByCode

CustomField findByCode(@NotNull
                       String code)
Will find the CustomField having a code value matching the parameter.

Parameters:
code -
Returns:
the CustomField matching the code param.


Copyright © 2010-2012 Henix, henix.fr. All Rights Reserved.