public String getDescription() { return desc.getDescription(); }
if (desc.getDescription() == null) { if (defn.description() != null && !defn.description().equals("")) { desc.setDescription(defn.description());
public Node writeDescriptor(Node parent, String nodeName, DataSourceDefinitionDescriptor dataSourceDesc) { Node node = appendChild(parent, nodeName); appendTextChild(node, TagNames.DATA_SOURCE_DESCRIPTION, dataSourceDesc.getDescription()); appendTextChild(node, TagNames.DATA_SOURCE_NAME, dataSourceDesc.getName()); appendTextChild(node, TagNames.DATA_SOURCE_CLASS_NAME, dataSourceDesc.getClassName()); appendTextChild(node, TagNames.DATA_SOURCE_SERVER_NAME, dataSourceDesc.getServerName()); appendTextChild(node, TagNames.DATA_SOURCE_PORT_NUMBER, dataSourceDesc.getPortNumber()); appendTextChild(node, TagNames.DATA_SOURCE_DATABASE_NAME, dataSourceDesc.getDatabaseName()); appendTextChild(node, TagNames.DATA_SOURCE_URL, dataSourceDesc.getUrl()); appendTextChild(node, TagNames.DATA_SOURCE_USER, dataSourceDesc.getUser()); appendTextChild(node, TagNames.DATA_SOURCE_PASSWORD, dataSourceDesc.getPassword()); ResourcePropertyNode propertyNode = new ResourcePropertyNode(); propertyNode.writeDescriptor(node, dataSourceDesc); appendTextChild(node, TagNames.DATA_SOURCE_LOGIN_TIMEOUT, String.valueOf(dataSourceDesc.getLoginTimeout())); appendTextChild(node, TagNames.DATA_SOURCE_TRANSACTIONAL, String.valueOf(dataSourceDesc.isTransactional())); //DD specified Enumeration values are String //Annotation uses integer values and hence this mapping is needed String isolationLevelString = dataSourceDesc.getIsolationLevelString(); if(isolationLevelString != null){ appendTextChild(node, TagNames.DATA_SOURCE_ISOLATION_LEVEL, isolationLevelString); } appendTextChild(node, TagNames.DATA_SOURCE_INITIAL_POOL_SIZE, dataSourceDesc.getInitialPoolSize()); appendTextChild(node, TagNames.DATA_SOURCE_MAX_POOL_SIZE, dataSourceDesc.getMaxPoolSize()); appendTextChild(node, TagNames.DATA_SOURCE_MIN_POOL_SIZE, dataSourceDesc.getMinPoolSize()); appendTextChild(node, TagNames.DATA_SOURCE_MAX_IDLE_TIME, String.valueOf(dataSourceDesc.getMaxIdleTime())); appendTextChild(node, TagNames.DATA_SOURCE_MAX_STATEMENTS, dataSourceDesc.getMaxStatements()); return node; }
public Node writeDescriptor(Node parent, String nodeName, DataSourceDefinitionDescriptor dataSourceDesc) { Node node = appendChild(parent, nodeName); appendTextChild(node, TagNames.DATA_SOURCE_DESCRIPTION, dataSourceDesc.getDescription()); appendTextChild(node, TagNames.DATA_SOURCE_NAME, dataSourceDesc.getName()); appendTextChild(node, TagNames.DATA_SOURCE_CLASS_NAME, dataSourceDesc.getClassName()); appendTextChild(node, TagNames.DATA_SOURCE_SERVER_NAME, dataSourceDesc.getServerName()); appendTextChild(node, TagNames.DATA_SOURCE_PORT_NUMBER, dataSourceDesc.getPortNumber()); appendTextChild(node, TagNames.DATA_SOURCE_DATABASE_NAME, dataSourceDesc.getDatabaseName()); appendTextChild(node, TagNames.DATA_SOURCE_URL, dataSourceDesc.getUrl()); appendTextChild(node, TagNames.DATA_SOURCE_USER, dataSourceDesc.getUser()); appendTextChild(node, TagNames.DATA_SOURCE_PASSWORD, dataSourceDesc.getPassword()); DataSourcePropertyNode propertyNode = new DataSourcePropertyNode(); propertyNode.writeDescriptor(node, dataSourceDesc); appendTextChild(node, TagNames.DATA_SOURCE_LOGIN_TIMEOUT, String.valueOf(dataSourceDesc.getLoginTimeout())); appendTextChild(node, TagNames.DATA_SOURCE_TRANSACTIONAL, String.valueOf(dataSourceDesc.isTransactional())); //DD specified Enumeration values are String //Annotation uses integer values and hence this mapping is needed String isolationLevelString = dataSourceDesc.getIsolationLevelString(); if(isolationLevelString != null){ appendTextChild(node, TagNames.DATA_SOURCE_ISOLATION_LEVEL, isolationLevelString); } appendTextChild(node, TagNames.DATA_SOURCE_INITIAL_POOL_SIZE, dataSourceDesc.getInitialPoolSize()); appendTextChild(node, TagNames.DATA_SOURCE_MAX_POOL_SIZE, dataSourceDesc.getMaxPoolSize()); appendTextChild(node, TagNames.DATA_SOURCE_MIN_POOL_SIZE, dataSourceDesc.getMinPoolSize()); appendTextChild(node, TagNames.DATA_SOURCE_MAX_IDLE_TIME, String.valueOf(dataSourceDesc.getMaxIdleTime())); appendTextChild(node, TagNames.DATA_SOURCE_MAX_STATEMENTS, dataSourceDesc.getMaxStatements()); return node; }