Code example for ResultSet

Methods: getClob, getString, getTimestamp

0
		public ConceptType buildConceptSet(ResultSet rowSet)
				throws SQLException, IOException { 
			ConceptType conceptDimensionType = new ConceptType();
 
			conceptDimensionType.setConceptCd(rowSet
					.getString("concept_concept_cd"));
 
			if (conceptDetailFlag) {
				conceptDimensionType.setConceptPath(rowSet
						.getString("concept_concept_path"));
				conceptDimensionType.setNameChar(rowSet
						.getString("concept_name_char"));
			} 
 
			if (conceptBlobFlag) {
				Clob conceptClob = rowSet.getClob("concept_concept_blob");
 
				if (conceptClob != null) {
					BlobType blobType = new BlobType();
					blobType.getContent().add(
							JDBCUtil.getClobStringWithLinebreak(conceptClob));
					conceptDimensionType.setConceptBlob(blobType);
				} 
			} 
 
			if (conceptStatusFlag) {
				if (rowSet.getTimestamp("concept_update_date") != null) {
					conceptDimensionType.setUpdateDate(dtoFactory
							.getXMLGregorianCalendar(rowSet.getTimestamp(
									"concept_update_date").getTime()));
				} 
 
				if (rowSet.getTimestamp("concept_download_date") != null) {
					conceptDimensionType.setDownloadDate(dtoFactory
							.getXMLGregorianCalendar(rowSet.getTimestamp(
									"concept_download_date").getTime()));
				} 
 
				if (rowSet.getTimestamp("concept_import_date") != null) {
					conceptDimensionType.setImportDate(dtoFactory
							.getXMLGregorianCalendar(rowSet.getTimestamp(
									"concept_import_date").getTime()));
				} 
 
				conceptDimensionType.setSourcesystemCd(rowSet
						.getString("concept_sourcesystem_cd"));
 
				conceptDimensionType.setUploadId(rowSet
						.getString("concept_upload_id"));
			} 
 
			return conceptDimensionType;
		} 
	}