protected Descriptions getDescription(String description) { DescriptionsImpl descriptions = null; if (description.length() > 0) { DescriptionImpl di = new DescriptionImpl(); di.setDescription(description); descriptions = new DescriptionsImpl(); descriptions.add(di); } return descriptions; }
CustomCategory customCategory = new CustomCategory(); CustomItem customItem = new CustomItem(); DescriptionImpl description = new DescriptionImpl(); customItem.getCategory();
public String value() { return getDescription(); }
public String value() { return getDescription(); }
protected Descriptions getDescription(String description) { DescriptionsImpl descriptions = null; if (description.length() > 0) { DescriptionImpl di = new DescriptionImpl(); di.setDescription(description); descriptions = new DescriptionsImpl(); descriptions.add(di); } return descriptions; }
/** * Get the description (the first one as per backwards compatibility) * * @return the description */ public String getDescription() { DescriptionsImpl descriptions = (DescriptionsImpl) getDelegate().getDescriptions(); if (descriptions == null || descriptions.isEmpty()) return null; return descriptions.iterator().next().getDescription(); }
protected Descriptions getDescription(String description) { DescriptionsImpl descriptions = null; if (description.length() > 0) { DescriptionImpl di = new DescriptionImpl(); di.setDescription(description); descriptions = new DescriptionsImpl(); descriptions.add(di); } return descriptions; }
/** * Get the description (the first one as per backwards compatibility) * * @return the description */ public String getDescription() { DescriptionsImpl descriptions = (DescriptionsImpl) getDelegate().getDescriptions(); if (descriptions == null || descriptions.isEmpty()) return null; return descriptions.iterator().next().getDescription(); }
public static Descriptions getDescription(String description) { DescriptionsImpl descriptions = null; if(description.length() > 0) { DescriptionImpl di = new DescriptionImpl(); di.setDescription(description); descriptions = new DescriptionsImpl(); descriptions.add(di); } return descriptions; } public static DescriptionGroupMetaData getDescriptionGroup(String description)
/** * Get the description * * @return the description */ public String getDescription() { DescriptionsImpl descriptions = (DescriptionsImpl) getDelegate().getDescriptions(); if (descriptions == null || descriptions.isEmpty()) return null; return descriptions.iterator().next().getDescription(); } /*
public static Descriptions getDescription(String description) { DescriptionsImpl descriptions = null; if(description.length() > 0) { DescriptionImpl di = new DescriptionImpl(); di.setDescription(description); descriptions = new DescriptionsImpl(); descriptions.add(di); } return descriptions; } public static DescriptionGroupMetaData getDescriptionGroup(String description)
/** * Get the description * * @return the description */ public String getDescription() { DescriptionsImpl descriptions = (DescriptionsImpl) getDelegate().getDescriptions(); if (descriptions == null || descriptions.isEmpty()) return null; return descriptions.iterator().next().getDescription(); } /*
public void setDescription(String desc) { DescriptionGroupMetaData group = getDescriptionGroup(); if(group == null) group = new DescriptionGroupMetaData(); DescriptionsImpl descriptions = new DescriptionsImpl(); DescriptionImpl di = new DescriptionImpl(); di.setDescription(desc); descriptions.add(di); group.setDescriptions(descriptions); } }
public void setDescription(String desc) { DescriptionGroupMetaData group = getDescriptionGroup(); if(group == null) group = new DescriptionGroupMetaData(); DescriptionsImpl descriptions = new DescriptionsImpl(); DescriptionImpl di = new DescriptionImpl(); di.setDescription(desc); descriptions.add(di); group.setDescriptions(descriptions); } }
protected SessionBeanMetaData create(Class<?> beanClass, String name, String mappedName, String description) { SessionBeanMetaData bean = new SessionBeanMetaData(); bean.setEjbClass(beanClass.getName()); String ejbName; if(name == null || name.length() == 0) ejbName = beanClass.getSimpleName(); else ejbName = name; bean.setEjbName(ejbName); if(mappedName != null && mappedName.length() > 0) bean.setMappedName(mappedName); if(description != null && description.length() > 0) { DescriptionGroupMetaData descriptionGroup = new DescriptionGroupMetaData(); DescriptionsImpl descriptions = new DescriptionsImpl(); DescriptionImpl descriptionImpl = new DescriptionImpl(); descriptionImpl.setDescription(description); descriptions.add(descriptionImpl); descriptionGroup.setDescriptions(descriptions); bean.setDescriptionGroup(descriptionGroup); } TransactionManagement txMgmt = finder.getAnnotation(beanClass, TransactionManagement.class); TransactionManagementType txType = TransactionManagementType.CONTAINER; if(txMgmt != null) txType = txMgmt.value(); bean.setTransactionType(txType); return bean; }
DescriptionImpl descriptionImpl = new DescriptionImpl(); descriptionImpl.setDescription(description); descriptions.add(descriptionImpl); descriptionGroup.setDescriptions(descriptions);
DescriptionImpl descriptionImpl = new DescriptionImpl(); descriptionImpl.setDescription(description); descriptions.add(descriptionImpl); descriptionGroup.setDescriptions(descriptions);
protected AnnotatedEJBReferenceMetaData createEJB(EJB annotation, E element) { AnnotatedEJBReferenceMetaData ref = new AnnotatedEJBReferenceMetaData(); if(annotation.name().length() > 0) ref.setEjbRefName(annotation.name()); else ref.setEjbRefName(getName(element)); if(annotation.beanInterface() != Object.class) ref.setBeanInterface(annotation.beanInterface()); else ref.setBeanInterface(getType(element)); if(annotation.description().length() > 0) { DescriptionImpl description = new DescriptionImpl(); description.setDescription(annotation.description()); DescriptionsImpl descriptions = new DescriptionsImpl(); descriptions.add(description); ref.setDescriptions(descriptions); } if(annotation.beanName().length() > 0) ref.setLink(annotation.beanName()); if(annotation.mappedName().length() > 0) ref.setMappedName(annotation.mappedName()); return ref; } }
protected AnnotatedEJBReferenceMetaData createEJB(EJB annotation, E element) { AnnotatedEJBReferenceMetaData ref = new AnnotatedEJBReferenceMetaData(); if(annotation.name().length() > 0) ref.setEjbRefName(annotation.name()); else ref.setEjbRefName(getName(element)); if(annotation.beanInterface() != Object.class) ref.setBeanInterface(annotation.beanInterface()); else ref.setBeanInterface(getType(element)); if(annotation.description().length() > 0) { DescriptionImpl description = new DescriptionImpl(); description.setDescription(annotation.description()); DescriptionsImpl descriptions = new DescriptionsImpl(); descriptions.add(description); ref.setDescriptions(descriptions); } if(annotation.beanName().length() > 0) ref.setLink(annotation.beanName()); if(annotation.mappedName().length() > 0) ref.setMappedName(annotation.mappedName()); String name = ProcessorUtils.getName(element); Set<ResourceInjectionTargetMetaData> injectionTargets = ProcessorUtils.getInjectionTargets(name, element); if(injectionTargets != null) ref.setInjectionTargets(injectionTargets); return ref; }
descriptionGroupMetaData.setDescriptions(descriptionsImpl); DescriptionImpl descriptionImpl = new DescriptionImpl(); descriptionImpl.setDescription(appData.description()); descriptionsImpl.add(descriptionImpl);