[hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-2) Default FieldBridge for enums

Sylvain Vieujot (JIRA) noreply at atlassian.com
Fri Feb 9 18:07:42 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-2?page=all ]

Sylvain Vieujot updated HSEARCH-2:
----------------------------------

    Attachment: EnumBridge.java

EnumBridge

Add the attached file to the source tree, and change BridgeFactory as follows :
After line 115, insert :

			if( bridge == null && returnType.isEnum() ){
				bridge = new TwoWayString2FieldBridgeAdaptor( new EnumBridge( (Class<? extends Enum>)returnType.getClass() ) );
			}

So the else statement looks like :
		else {
			//find in built-ins
			XClass returnType = member.getType();
			bridge = builtInBridges.get( returnType.getName() );
			
			if( bridge == null && returnType.isEnum() ){
				bridge = new TwoWayString2FieldBridgeAdaptor( new EnumBridge( (Class<? extends Enum>)returnType.getClass() ) );
			}
		}

> Default FieldBridge for enums
> -----------------------------
>
>          Key: HSEARCH-2
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-2
>      Project: Hibernate Search
>         Type: New Feature

>   Components: mapping
>     Reporter: Emmanuel Bernard
>      Fix For: FIRST
>  Attachments: EnumBridge.java
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list