Package org.springframework.data.annotation

Examples of org.springframework.data.annotation.TypeAlias


   * (non-Javadoc)
   * @see org.springframework.data.mapping.PersistentEntity#getTypeAlias()
   */
  public Object getTypeAlias() {

    TypeAlias alias = getType().getAnnotation(TypeAlias.class);
    return alias == null ? null : StringUtils.hasText(alias.value()) ? alias.value() : null;
  }
View Full Code Here


        assertEquals(settingsA, settingsB);
    }

    @Test
    public void classShouldHaveTypeAliasAnnotation() {
        TypeAlias typeAlias = EntityCrudKitSettings.class.getAnnotation(TypeAlias.class);
        assertNotNull(typeAlias);
        assertEquals("EntityCrudKitSettings", typeAlias.value());
    }
View Full Code Here

        }
    }

    @Test
    public void classShouldHaveTypeAlias() {
        TypeAlias typeAlias = ProjectEntityCrudKitSettings.class.getAnnotation(TypeAlias.class);
        assertNotNull("ProjectEntityCrudKitSettings does not have a type alias annotation", typeAlias);
        assertEquals("ProjectEntityCrudKitSettings", typeAlias.value());
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.annotation.TypeAlias

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.