Package br.net.woodstock.rockframework.core.reflection.impl

Examples of br.net.woodstock.rockframework.core.reflection.impl.BeanDescriptorBuilder


    try {
      Object obj = Ognl.getValue(entityName, action);
      if ((obj != null) && (obj instanceof Entity)) {
        Entity<?> entity = (Entity<?>) obj;

        BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(entity.getClass()).getBeanDescriptor();

        PropertyDescriptor propertyDescriptor = beanDescriptor.getProperty(EntityInterceptor.ENTITY_ID);
        Class<?> clazz = propertyDescriptor.getType();

        try {
View Full Code Here


    if (tag.dynamicAttributes()) {
      root.addElement("dynamic-attributes").setData(Boolean.valueOf(tag.dynamicAttributes()));
    }

    BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(clazz).getBeanDescriptor();

    for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
      if (!propertyDescriptor.isAnnotationPresent(Attribute.class)) {
        continue;
      }
View Full Code Here

  public void cleanEntity(final AbstractPreDatabaseOperationEvent event) {
    Object src = event.getEntity();
    EventSource eventSource = event.getSession();
    if (src instanceof Entity) {
      try {
        BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(src.getClass()).getBeanDescriptor();
        for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
          Class propertyType = propertyDescriptor.getType();
          Object propertyValue = propertyDescriptor.getValue(src);
          if (Entity.class.isAssignableFrom(propertyType)) {
            Entity entity = (Entity) propertyValue;
View Full Code Here

  @SuppressWarnings("rawtypes")
  public void refreshEntity(final Object src, final EventSource eventSource) {
    if (src instanceof Entity) {
      try {
        BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(src.getClass()).getBeanDescriptor();
        for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
          Class propertyType = propertyDescriptor.getType();
          Object propertyValue = propertyDescriptor.getValue(src);
          if (Entity.class.isAssignableFrom(propertyType)) {
            Entity entity = (Entity) propertyValue;
View Full Code Here

      XmlElement entity = entityMappings.addElement("entity");
      entity.setAttribute("class", clazz.getCanonicalName());
      entity.setAttribute("access", "PROPERTY");
      entity.setAttribute("metadata-complete", "true");

      BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(clazz).getBeanDescriptor();
      Entity e = beanDescriptor.getAnnotation(Entity.class);
      if (Conditions.isNotEmpty(e.name())) {
        entity.setAttribute("name", e.name());
      }
View Full Code Here

  public Collection<String> getErrors(final String baseName) {
    Assert.notEmpty(baseName, "baseName");
    Collection<String> collection = new ArrayList<String>();
    ClassFinder classFinder = new ClassFinderImpl(baseName, new AssignableClassFilter(Entity.class));
    for (Class<?> clazz : classFinder.getClasses()) {
      BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(clazz).getBeanDescriptor();
      for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
        String name = propertyDescriptor.getName();
        if (propertyDescriptor.isAnnotationPresent(Column.class)) {
          if (propertyDescriptor.isAnnotationPresent(Enumerated.class)) {
            this.columnChecker.checkEnumColumn(name, propertyDescriptor, collection);
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.core.reflection.impl.BeanDescriptorBuilder

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.