#if( ! ${prop.isExtended()} )
    /**
     * Get the ${prop.getName()} [ ${prop.getLabel()} ]
     * @return ${prop.getType().getName()}
#set( $column = ${prop.getOriginal()} )
#if( ${prop.isSinglePrimaryKey()} )	 
     * @hibernate.id generator-class="native" column="${column.getName()}"
#elseif( ! ${prop.isInForeignKey()} ) 
     * @hibernate.property column="${column.getName()}"
#end
     */
    public ${prop.getType().getName()} get${prop.getCapitalizedName()}() {
#set($propReferences = ${prop.getReferencesContainedAsLocal()} )
#if( ${propReferences.size()} == 1 )
	#set( $propReference = ${propReferences.get(0)} )
	#set( $refPropName = ${propReference.getPropertyNameInLocal()} )
	#set( $refPropNameCapitalized = "${stringUtils.capitalize(${refPropName})}" )
	#if( ${prop.getType().isPrimitive()}  )
		#if( ${prop.getType().getCategory().getName()} == "number" ) 
		if ((${prop.getName()} == 0) && (this.get${refPropNameCapitalized}() != null)) 
		#else
		//what should I do?
		if ((${prop.getName()} == null) && (this.get${refPropNameCapitalized}() != null)) 
		#end
	#else
		if ((${prop.getName()} == null) && (this.get${refPropNameCapitalized}() != null)) 
	#end
	#set( $propReferenceEntry = ${propReference.getEntry(0)} )
	#set( $foreignPropGetter = "get${propReferenceEntry.foreign.capitalizedName}" )	
	#if( ${propReferenceEntry.local.type.isPrimitive()} )
    	#if( ${propReferenceEntry.foreign.type.isPrimitive()} )
			return ${refPropName}.${foreignPropGetter}();
    	#else
			return ${refPropName}.${foreignPropGetter}().${propReferenceEntry.local.type.name}Value();
    	#end
	#else
    	#if( ${propReferenceEntry.foreign.type.isPrimitive()} )
			return new ${propReferenceEntry.local.type.name}(${refPropName}.${foreignPropGetter}());
    	#else
			return ${refPropName}.${foreignPropGetter}();
    	#end
	#end
		 else 
	        return ${prop.getName()};
#else
        return ${prop.getName()};
#end
    }
#end
