streamWriter.writeStartElement(Pool.Tag.CAPACITY.getLocalName()); if (conDef.hasDefined(CAPACITY_INCREMENTER_CLASS.getName())) { streamWriter.writeStartElement(Capacity.Tag.INCREMENTER.getLocalName());
/** * * Static method to get enum instance given localName XsdString * * @param localName a XsdString used as localname (typically tag name as defined in xsd) * @return the enum instance */ public static Tag forName(String localName) { final Tag element = MAP.get(localName); return element == null ? UNKNOWN.value(localName) : element; } }
streamWriter.writeStartElement(Pool.Tag.CAPACITY.getLocalName()); if (conDef.hasDefined(CAPACITY_INCREMENTER_CLASS.getName())) { streamWriter.writeStartElement(Capacity.Tag.INCREMENTER.getLocalName());
/** * {@inheritDoc} */ public void validate() throws ValidateException { if (this.maxPoolSize != null && this.maxPoolSize.intValue() < 0) throw new ValidateException(bundle.invalidNegative(Tag.MAX_POOL_SIZE.getLocalName())); if (this.maxPoolSize != null && this.maxPoolSize.intValue() == 0) throw new ValidateException(bundle.invalidZero(Tag.MAX_POOL_SIZE.getLocalName())); if (this.minPoolSize != null && this.minPoolSize.intValue() < 0) throw new ValidateException(bundle.invalidNegative(Tag.MIN_POOL_SIZE.getLocalName())); if (this.minPoolSize != null && this.maxPoolSize != null) { if (minPoolSize.intValue() > maxPoolSize.intValue()) throw new ValidateException(bundle.notValidNumber(minPoolSize.toString(), Tag.MIN_POOL_SIZE.getLocalName())); } if (this.flushStrategy == null) throw new ValidateException(bundle.nullValue(Tag.FLUSH_STRATEGY.getLocalName())); }