Package org.freezedry.persistence.annotations

Examples of org.freezedry.persistence.annotations.PersistMap


    String keyPersistName = PersistMap.KEY_PERSIST_NAME;
    String valuePersistName = PersistMap.VALUE_PERSIST_NAME;
    try
    {
      final Field field = ReflectionUtils.getDeclaredField( containingClass, fieldName );
      final PersistMap mapAnnotation = field.getAnnotation( PersistMap.class );
      if( mapAnnotation != null )
      {
        if( !mapAnnotation.entryPersistName().isEmpty() )
        {
          entryPersistName = mapAnnotation.entryPersistName();
        }
        if( !mapAnnotation.keyPersistName().isEmpty() )
        {
          keyPersistName = mapAnnotation.keyPersistName();
        }
        if( !mapAnnotation.valuePersistName().isEmpty() )
        {
          valuePersistName = mapAnnotation.valuePersistName();
        }
      }
    }
    catch( ReflectiveOperationException e )
    {
View Full Code Here


   
    // if a field was found, then see if that field has an annotation, and if that annotation overrides
    // the key name and/or the value name
    if( field != null )
    {
      final PersistMap mapAnnotation = field.getAnnotation( PersistMap.class );
      if( mapAnnotation != null )
      {
        final String keyName = mapAnnotation.keyPersistName();
        if( keyName != null && !keyName.isEmpty() )
        {
          keyValue.setFirst( keyName );
        }
       
        final String valueName = mapAnnotation.valuePersistName();
        if( valueName != null && !valueName.isEmpty() )
        {
          keyValue.setSecond( valueName );
        }
      }
View Full Code Here

    String keyPersistName = PersistMap.KEY_PERSIST_NAME;
    String valuePersistName = PersistMap.VALUE_PERSIST_NAME;
    try
    {
      final Field field = ReflectionUtils.getDeclaredField( containingClass, fieldName );
      final PersistMap mapAnnotation = field.getAnnotation( PersistMap.class );
      if( mapAnnotation != null )
      {
        if( !mapAnnotation.entryPersistName().isEmpty() )
        {
          entryPersistName = mapAnnotation.entryPersistName();
        }
        if( !mapAnnotation.keyPersistName().isEmpty() )
        {
          keyPersistName = mapAnnotation.keyPersistName();
        }
        if( !mapAnnotation.valuePersistName().isEmpty() )
        {
          valuePersistName = mapAnnotation.valuePersistName();
        }
      }
    }
    catch( ReflectiveOperationException e )
    {
View Full Code Here

   
    // if a field was found, then see if that field has an annotation, and if that annotation overrides
    // the key name and/or the value name
    if( field != null )
    {
      final PersistMap mapAnnotation = field.getAnnotation( PersistMap.class );
      if( mapAnnotation != null )
      {
        final String keyName = mapAnnotation.keyPersistName();
        if( keyName != null && !keyName.isEmpty() )
        {
          keyValue.setFirst( keyName );
        }
       
        final String valueName = mapAnnotation.valuePersistName();
        if( valueName != null && !valueName.isEmpty() )
        {
          keyValue.setSecond( valueName );
        }
      }
View Full Code Here

TOP

Related Classes of org.freezedry.persistence.annotations.PersistMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.