ArcSDEDataStore implements DataStore { public void createSchema(final SimpleFeatureType featureType) throws IOException { Map<String, String> hints = new HashMap<String, String>(); hints.put("rowid.column.type", "SDE"); String rowIdName = "SDE_ROW_ID"; while (featureType.getDescriptor(rowIdName) != null) { rowIdName += "2"; } hints.put("rowid.column.name", rowIdName); createSchema(featureType, hints); } ArcSDEDataStore(final ISessionPool connPool);  ArcSDEDataStore(final ISessionPool connPool, final String namespaceUri,
            final String versionName, final boolean allowNonSpatialTables); ISession getSession(Transaction transaction); void createSchema(final SimpleFeatureType featureType); SimpleFeatureType getSchema(final String typeName); String[] getTypeNames(); ServiceInfo getInfo(); void dispose(); FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader(final Query query,
            final Transaction transaction); FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader(final Query query,
            final Transaction transaction, final SimpleFeatureType featureType); SimpleFeatureType getQueryType(Query query); SimpleFeatureSource getFeatureSource(final String typeName); ArcSdeFeatureWriter getFeatureWriter(final String typeName, final Transaction transaction); ArcSdeFeatureWriter getFeatureWriter(final String typeName, final Filter filter,
            final Transaction transaction); ArcSdeFeatureWriter getFeatureWriterAppend(final String typeName,
            final Transaction transaction); LockingManager getLockingManager(); void updateSchema(final String typeName, final SimpleFeatureType featureType); SimpleFeatureSource getFeatureSource(Name typeName); List<Name> getNames(); SimpleFeatureType getSchema(Name name); void updateSchema(Name typeName, SimpleFeatureType featureType); void createSchema(final SimpleFeatureType featureType, final Map<String, String> hints); @Override void removeSchema(Name typeName); @Override void removeSchema(String typeName);  }
@Test public void testCreateSchema() throws IOException, SchemaException, SeException, UnavailableConnectionException { final String typeName; { ISessionPool connectionPool = testData.getConnectionPool(); ISession session = connectionPool.getSession(); final String user; user = session.getUser(); session.dispose(); typeName = user + ".GT_TEST_CREATE"; } SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder(); b.setName(typeName); b.add("FST_COL", String.class); b.add("SECOND_COL", String.class); b.add("GEOM", Point.class); b.add("FOURTH_COL", Integer.class); final SimpleFeatureType type = b.buildFeatureType(); DataStore ds = testData.getDataStore(); testData.deleteTable(typeName); Map<String, String> hints = new HashMap<String, String>(); hints.put("configuration.keyword", testData.getConfigKeyword()); ((ArcSDEDataStore) ds).createSchema(type, hints); testData.deleteTable(typeName); }
@Test public void testCreateNillableShapeSchema() throws IOException, SchemaException, SeException, UnavailableConnectionException { SimpleFeatureType type; final String typeName = "GT_TEST_CREATE"; SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder(); b.setName(typeName); b.add("OBJECTID", Integer.class); b.nillable(true); b.add("SHAPE", MultiLineString.class); type = b.buildFeatureType(); ArcSDEDataStore ds = testData.getDataStore(); testData.deleteTable(typeName); Map<String, String> hints = new HashMap<String, String>(); hints.put("configuration.keyword", testData.getConfigKeyword()); ds.createSchema(type, hints); testData.deleteTable(typeName); }