Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.util
Interface DefaultRelationNameResolver

Default impl that returns parentName & childName accordingly.

Method Summary
`String` | `getIdentifierFor(String nodeName)` Returns the name of the property that will identify the node.
`String` | `getReferenceFor(String nodeName)` Returns the name of the property that references another node.
`Object` | `newInstance(Class klass, Map attributes)` Create a new instance of Class klass.
`String` | `resolveChildRelationName(String parentName, Object parent, String childName, Object child)` Follow the most conventional plural in English, add 's' to childName.
`String` | `resolveChildRelationName(String parentName, Object parent, String childName, Object child)` Returns the mapping name of child -> parent
`String` | `resolveParentRelationName(String parentName, Object parent, String childName, Object child)` Follow the most conventional pattern, returns the parentName unchanged.
`String` | `resolveParentRelationName(String parentName, Object parent, String childName, Object child)` Returns the mapping name of child -> parent

Method Detail

### getIdentifierFor

    public String getIdentifierFor(String nodeName)

  Returns the name of the property that will identify the node.
  param:
    nodeName the name of the node

### getReferenceFor

    public String getReferenceFor(String nodeName)

  Returns the name of the property that references another node.
  param:
    nodeName the name of the node

### newInstance

    public Object newInstance(Class klass, Map attributes)

  Create a new instance of Class klass.
  param:
    klass the resolved class name
  param:
    attributes the attribute Map available for the node

### resolveChildRelationName

    public String resolveChildRelationName(String parentName, Object parent, String childName, Object child)

  Follow the most conventional plural in English, add 's' to childName.
  If the property does not exist then it will return childName unchanged.

### resolveChildRelationName

    public String resolveChildRelationName(String parentName, Object parent, String childName, Object child)

  Returns the mapping name of child -> parent
  param:
    parentName the name of the parent node
  param:
    parent the parent node
  param:
    childName the name of the child node
  param:
    child the child node

### resolveParentRelationName

    public String resolveParentRelationName(String parentName, Object parent, String childName, Object child)

  Follow the most conventional pattern, returns the parentName unchanged.

### resolveParentRelationName

    public String resolveParentRelationName(String parentName, Object parent, String childName, Object child)

  Returns the mapping name of child -> parent
  param:
    parentName the name of the parent node
  param:
    parent the parent node
  param:
    childName the name of the child node
  param:
    child the child node