/** * Set the property on the node as read from the {@link RepositoryConnection} * * @param property the property that was read * @throws IllegalArgumentException if the property's name does not match the {@link #named() name of the property} that was * to be read * @throws IllegalStateException if the request is frozen */ public void setProperty( Property property ) { checkNotFrozen(); if (property != null) CheckArg.isEquals(property.getName(), "property's name", named(), "property name"); this.property = property; }
/** * Add a table with the supplied name and column names and types. The table will also overwrite any existing table * definition with the same name. * * @param name the name of the new table * @param columnNames the names of the columns * @param types the types for the columns * @return this builder, for convenience in method chaining; never null * @throws IllegalArgumentException if the table name is null or empty, any column name is null or empty, if no column * names are given, or if the number of types does not match the number of columns */ public Builder addTable( String name, String[] columnNames, String[] types ) { CheckArg.isNotEmpty(name, "name"); CheckArg.isNotEmpty(columnNames, "columnNames"); CheckArg.isNotEmpty(types, "types"); CheckArg.isEquals(columnNames.length, "columnNames.length", types.length, "types.length"); List<Column> columns = new ArrayList<Column>(); assert columnNames.length == types.length; for (int i = 0; i != columnNames.length; ++i) { String columnName = columnNames[i]; CheckArg.isNotEmpty(columnName, "columnName[" + i + "]"); columns.add(new ImmutableColumn(columnName, types[i])); } MutableTable table = new MutableTable(name, columns, false); tables.put(name, table); return this; }
/** * Add a table with the supplied name and column names and types. The table will also overwrite any existing table * definition with the same name. * * @param name the name of the new table * @param columnNames the names of the columns * @param types the types for the columns * @return this builder, for convenience in method chaining; never null * @throws IllegalArgumentException if the table name is null or empty, any column name is null or empty, if no column * names are given, or if the number of types does not match the number of columns */ public Builder addTable( String name, String[] columnNames, String[] types ) { CheckArg.isNotEmpty(name, "name"); CheckArg.isNotEmpty(columnNames, "columnNames"); CheckArg.isNotEmpty(types, "types"); CheckArg.isEquals(columnNames.length, "columnNames.length", types.length, "types.length"); List<Column> columns = new ArrayList<Column>(); assert columnNames.length == types.length; for (int i = 0; i != columnNames.length; ++i) { String columnName = columnNames[i]; CheckArg.isNotEmpty(columnName, "columnName[" + i + "]"); columns.add(new ImmutableColumn(columnName, types[i])); } MutableTable table = new MutableTable(name, columns, false); tables.put(name, table); return this; }
/** * Add a table with the supplied name and column names and types. The table will also overwrite any existing table * definition with the same name. * * @param name the name of the new table * @param columnNames the names of the columns * @param types the types for the columns * @return this builder, for convenience in method chaining; never null * @throws IllegalArgumentException if the table name is null or empty, any column name is null or empty, if no column * names are given, or if the number of types does not match the number of columns */ public Builder addTable( String name, String[] columnNames, String[] types ) { CheckArg.isNotEmpty(name, "name"); CheckArg.isNotEmpty(columnNames, "columnNames"); CheckArg.isNotEmpty(types, "types"); CheckArg.isEquals(columnNames.length, "columnNames.length", types.length, "types.length"); List<Column> columns = new ArrayList<Column>(); assert columnNames.length == types.length; for (int i = 0; i != columnNames.length; ++i) { String columnName = columnNames[i]; CheckArg.isNotEmpty(columnName, "columnName[" + i + "]"); columns.add(new ImmutableColumn(columnName, types[i])); } MutableTable table = new MutableTable(name, columns, false); tables.put(name, table); return this; }
CheckArg.isEquals(element.getNamespaceUri(), "namespace URI", URI, "relational URI");
CheckArg.isEquals(element.getNamespaceUri(), "namespace URI", URI, "relational URI");
/** * @see org.modeshape.sequencer.teiid.model.ModelObjectHandler#process(org.modeshape.sequencer.teiid.xmi.XmiElement, * javax.jcr.Node) */ @Override protected void process( final XmiElement element, final Node parentNode ) throws Exception { CheckArg.isNotNull(element, "element"); CheckArg.isNotNull(parentNode, "node"); CheckArg.isEquals(element.getNamespaceUri(), "namespace URI", URI, "relational URI"); LOGGER.debug("==== TransformationModelObjectHandler:process:element={0}", element.getName()); if (ModelId.TRANSFORMATION_CONTAINER.equals(element.getName())) { // just process children for (final XmiElement kid : element.getChildren()) { if (ModelId.TRANSFORMATION_MAPPINGS.equals(kid.getName())) { processMappings(kid); } else { LOGGER.debug("**** transformation container child of '{0}' was not processed", kid.getName()); } } } else { LOGGER.debug("**** transformation type of '{0}' was not processed", element.getName()); } }
/** * @see org.teiid.modeshape.sequencer.vdb.model.ModelObjectHandler#process(org.teiid.modeshape.sequencer.vdb.xmi.XmiElement, * javax.jcr.Node) */ @Override protected void process( final XmiElement element, final Node parentNode ) throws Exception { CheckArg.isNotNull(element, "element"); CheckArg.isNotNull(parentNode, "node"); CheckArg.isEquals(element.getNamespaceUri(), "namespace URI", URI, "relational URI"); LOGGER.debug("==== TransformationModelObjectHandler:process:element={0}", element.getName()); if (ModelId.TRANSFORMATION_CONTAINER.equals(element.getName())) { // just process children for (final XmiElement kid : element.getChildren()) { if (ModelId.TRANSFORMATION_MAPPINGS.equals(kid.getName())) { processMappings(kid); } else { LOGGER.debug("**** transformation container child of '{0}' was not processed", kid.getName()); } } } else { LOGGER.debug("**** transformation type of '{0}' was not processed", element.getName()); } }
CheckArg.isNotNull(element, "element"); CheckArg.isNotNull(parentNode, "outputNode"); CheckArg.isEquals(element.getNamespaceUri(), "namespace URI", URI, "JDBC URI");
CheckArg.isNotNull(element, "element"); CheckArg.isNotNull(parentNode, "outputNode"); CheckArg.isEquals(element.getNamespaceUri(), "namespace URI", URI, "JDBC URI");
CheckArg.isNotNull(element, "element"); CheckArg.isNotNull(modelNode, "node"); CheckArg.isEquals(element.getNamespaceUri(), "namespace URI", URI, "relational URI");
CheckArg.isNotNull(element, "element"); CheckArg.isNotNull(modelNode, "node"); CheckArg.isEquals(element.getNamespaceUri(), "namespace URI", URI, "relational URI");
CheckArg.isEquals(this.isRoot(), "this.isRoot()", false, "false"); final Node<Payload, PropertyPayload> child = this; assert !parent.isStale();