Groovy Documentation

org.grails.plugin.vaadin.utils
[Groovy] Class DomainProxy

java.lang.Object
  groovy.lang.GroovyObjectSupport
      groovy.util.Proxy
          org.grails.plugin.vaadin.utils.DomainProxy

class DomainProxy
extends Proxy

For adding equals() and hashCode() methods to domain classes using a proxy technique that leaves the domain class unchanged.

Authors:
Francis McKenzie


Field Summary
private def equalsProperty

 
Constructor Summary
DomainProxy(def equalsProperty)

Create the proxy using the specified property of the domain class for the equals() and hashCode methods()

 
Method Summary
boolean equals(def other)

Overridden to use the specified property.

Object getProperty(String propertyName)

Ensures all properties are proxied, not just methods

int hashCode()

Overridden to use the specified property.

void setProperty(String propertyName, Object value)

Ensures all properties are proxied, not just methods

 
Methods inherited from class Proxy
iterator, wrap, invokeMethod, getAdaptee, setAdaptee, setProperty, getProperty, getMetaClass, setMetaClass, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 
Methods inherited from class GroovyObjectSupport
setProperty, getProperty, getMetaClass, setMetaClass, invokeMethod, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

equalsProperty

private def equalsProperty


 
Constructor Detail

DomainProxy

DomainProxy(def equalsProperty)
Create the proxy using the specified property of the domain class for the equals() and hashCode methods()
Parameters:
equalsProperty - The property of the domain class to use for the equals() and hashCode() methods.


 
Method Detail

equals

boolean equals(def other)
Overridden to use the specified property.


getProperty

Object getProperty(String propertyName)
Ensures all properties are proxied, not just methods


hashCode

int hashCode()
Overridden to use the specified property.


setProperty

void setProperty(String propertyName, Object value)
Ensures all properties are proxied, not just methods


 

Groovy Documentation