1 21 22 package org.apache.derby.impl.load; 23 24 abstract class ExportWriteDataAbstract { 25 26 protected ControlInfo controlFileReader; 27 protected int[] columnLengths; 28 29 protected String fieldSeparator; 30 protected String recordSeparator; 31 protected String nullString; 32 protected String columnDefinition; 33 protected String format; 34 protected String fieldStartDelimiter; 35 protected String fieldStopDelimiter; 36 protected String dataCodeset; 37 protected String dataLocale; 38 protected boolean hasDelimiterAtEnd; 39 protected boolean doubleDelimiter=true; 40 41 protected void loadPropertiesInfo() throws Exception { 43 fieldSeparator = controlFileReader.getFieldSeparator(); 44 recordSeparator = controlFileReader.getRecordSeparator(); 45 nullString = controlFileReader.getNullString(); 46 columnDefinition = controlFileReader.getColumnDefinition(); 47 format = controlFileReader.getFormat(); 48 fieldStartDelimiter = controlFileReader.getFieldStartDelimiter(); 49 fieldStopDelimiter = controlFileReader.getFieldEndDelimiter(); 50 dataCodeset = controlFileReader.getDataCodeset(); 51 hasDelimiterAtEnd = controlFileReader.getHasDelimiterAtEnd(); 52 } 53 54 abstract void writeColumnDefinitionOptionally(String [] columnNames, 57 String [] columnTypes) 58 throws Exception ; 59 60 public void setColumnLengths(int[] columnLengths) { 62 this.columnLengths = columnLengths; 63 } 64 65 public abstract void writeData(String [] oneRow, boolean[] isNumeric) throws Exception ; 67 68 public abstract void noMoreRows() throws Exception ; 71 } 72 | Popular Tags |