Esempio n. 1
0
  protected PropertyMeta parseId(PropertyParsingContext context) {
    log.debug(
        "Parsing property {} as id of entity class {}",
        context.getCurrentPropertyName(),
        context.getCurrentEntityClass().getCanonicalName());

    PropertyMeta idMeta = parseSimpleProperty(context);
    idMeta.setType(ID);
    Id id = context.getCurrentField().getAnnotation(Id.class);
    String propertyName =
        StringUtils.isNotBlank(id.name()) ? id.name() : context.getCurrentPropertyName();
    idMeta.setPropertyName(propertyName);

    return idMeta;
  }