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

All Superinterfaces:
CustomCustomFieldDao

public interface CustomFieldDao
extends CustomCustomFieldDao


Method Summary
 long countCustomFields()
          Will count all existing custom fields
 List<org.squashtest.tm.domain.customfield.CustomField> findAll()
           
 List<org.squashtest.tm.domain.customfield.CustomField> findAllBindableCustomFields(Long projectId, org.squashtest.tm.domain.customfield.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<org.squashtest.tm.domain.customfield.CustomField> findAllBoundCustomFields(Long projectId, org.squashtest.tm.domain.customfield.BindableEntity bindableEntity)
          returns the complementary of findAllBindableCustomFields(Long, BindableEntity)
 List<org.squashtest.tm.domain.customfield.CustomField> findAllOrderedByName()
          Will find all custom fields and return them ordered by their name.
 org.squashtest.tm.domain.customfield.CustomField findByCode(String code)
          Will find the CustomField having a code value matching the parameter.
 org.squashtest.tm.domain.customfield.CustomField findById(long id)
           
 org.squashtest.tm.domain.customfield.CustomField findByName(String name)
          Returns the field matching the name if it exists.
 void persist(org.squashtest.tm.domain.customfield.CustomField customField)
           
 void remove(org.squashtest.tm.domain.customfield.CustomField customField)
           
 
Methods inherited from interface org.squashtest.tm.service.internal.repository.CustomCustomFieldDao
findSingleSelectFieldById, findSortedCustomFields
 

Method Detail

findAll

List<org.squashtest.tm.domain.customfield.CustomField> findAll()

findAllBindableCustomFields

List<org.squashtest.tm.domain.customfield.CustomField> findAllBindableCustomFields(Long projectId,
                                                                                   org.squashtest.tm.domain.customfield.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:

findAllBoundCustomFields

List<org.squashtest.tm.domain.customfield.CustomField> findAllBoundCustomFields(Long projectId,
                                                                                org.squashtest.tm.domain.customfield.BindableEntity bindableEntity)
returns the complementary of findAllBindableCustomFields(Long, BindableEntity)

Parameters:
projectId -
bindableEntity -
Returns:

persist

void persist(org.squashtest.tm.domain.customfield.CustomField customField)

findById

org.squashtest.tm.domain.customfield.CustomField findById(long id)

remove

void remove(org.squashtest.tm.domain.customfield.CustomField customField)

findByName

org.squashtest.tm.domain.customfield.CustomField findByName(@NotNull
                                                            String name)
Returns the field matching the name if it exists.

Parameters:
name -
Returns:

findAllOrderedByName

List<org.squashtest.tm.domain.customfield.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

org.squashtest.tm.domain.customfield.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-2013 Henix, henix.fr. All Rights Reserved.