public int hcode ( ) { final int prime = 31 ; int result = 1 ; Table table = this . table ( ) ; Set < Entry < String , Object > > attrsEntrySet = this . _getAttrsEntrySet ( ) ; for ( Entry < String , Object > entry : attrsEntrySet ) { String key = entry . getKey ( ) ; Object value = entry . getValue ( ) ; Class < ? > clazz = table . getColumnType ( key ) ; if ( clazz == Integer . class ) { result = prime * result + ( Integer ) value ; } else if ( clazz == Short . class ) { result = prime * result + ( Short ) value ; } else if ( clazz == Long . class ) { result = prime * result + ( int ) ( ( Long ) value ^ ( ( Long ) value >>> 32 ) ) ; } else if ( clazz == Float . class ) { result = prime * result + Float . floatToIntBits ( ( Float ) value ) ; } else if ( clazz == Double . class ) { long temp = Double . doubleToLongBits ( ( Double ) value ) ; result = prime * result + ( int ) ( temp ^ ( temp >>> 32 ) ) ; } else if ( clazz == Boolean . class ) { result = prime * result + ( ( Boolean ) value ? 1231 : 1237 ) ; } else if ( clazz == Model . class ) { result = this . hcode ( ) ; } else { result = prime * result + ( ( value == null ) ? 0 : value . hashCode ( ) ) ; } } return result ; }
wrapper hash code