Tabnine Logo
SIComposite.getType
Code IndexAdd Tabnine to your IDE (free)

How to use
getType
method
in
org.opensingular.form.SIComposite

Best Java code snippets using org.opensingular.form.SIComposite.getType (Showing top 20 results out of 315)

origin: org.opensingular/singular-requirement-commons

  @Override
  public STypePdfHealth getType() {
    return (STypePdfHealth) super.getType();
  }
}
origin: org.opensingular/singular-form-core

  @Override
  public T getType() {
    return (T) super.getType();
  }
}
origin: org.opensingular/singular-requirement-module

  @Override
  public STypePdfHealth getType() {
    return (STypePdfHealth) super.getType();
  }
}
origin: org.opensingular/requirement-sei-30-features-lib

@Nonnull
@Override
public STypeModeloSEI getType() {
  return (STypeModeloSEI) super.getType();
}
origin: org.opensingular/singular-form-core

@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  } else if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  SIComposite other = (SIComposite) obj;
  return getType().equals(other.getType()) && Objects.equals(fields, other.fields);
}
origin: org.opensingular/form-core

@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  } else if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  SIComposite other = (SIComposite) obj;
  return getType().equals(other.getType()) && Objects.equals(fields, other.fields);
}
origin: org.opensingular/singular-form-core

private JSWrapperInstance<SInstance>[] getFieldsWrappers() {
  if (fieldsWrappers == null) {
    fieldsWrappers = new JSWrapperInstance[getInstance().getType().size()];
  }
  return fieldsWrappers;
}
origin: org.opensingular/form-core

@Override
default List<Value.Content> load(SIComposite ins, String query) {
  final SCompositeListBuilder builder = new SCompositeListBuilder((STypeComposite<SIComposite>) ins.getType(), ins);
  fill(builder, query);
  final List<Value.Content> listMap = new ArrayList<>();
  builder.getList().forEach(i -> listMap.add(Value.dehydrate(i)));
  return listMap;
}
origin: org.opensingular/singular-form-core

  protected List<SInstance> getContainerInstances(SIComposite instance) {
    List<SInstance> result = new ArrayList<>();
    for (RelationalFK fk : RelationalSQL.tableFKs(instance.getType())) {
      Optional<SInstance> containerInstance = findAncestor(instance, fk.getForeignType());
      if (!containerInstance.isPresent()) {
        containerInstance = findDescendant(instance, fk.getForeignType());
      }
      containerInstance.ifPresent(result::add);
    }
    return result;
  }
}
origin: org.opensingular/singular-form-core

/**
 * Retorna todos os campos do tipo, instanciando os que ainda não foram.
 *
 * @return instancias dos campos
 */
@Nonnull
public List<SInstance> getAllFields() {
  for (SType<?> field : getType().getFields())
    getField(field.getNameSimple());
  return getFields();
}
origin: org.opensingular/singular-form-core

private SInstance createField(int fieldIndex) {
  SType<?> fieldType = getType().getField(fieldIndex);
  SInstance instance = fieldType.newInstance(getDocument());
  if (fields == null) {
    fields = new FieldMapOfRecordInstance(getType().size());
  }
  fields.set(fieldIndex, instance);
  instance.setParent(this);
  return instance;
}
origin: org.opensingular/form-core

private SInstance createField(int fieldIndex) {
  SType<?> fieldType = getType().getField(fieldIndex);
  SInstance instance = fieldType.newInstance(getDocument());
  if (fields == null) {
    fields = new FieldMapOfRecordInstance(getType().size());
  }
  fields.set(fieldIndex, instance);
  instance.setParent(this);
  return instance;
}
origin: org.opensingular/form-core

/**
 * Retorna todos os campos do tipo, instanciando os que ainda não foram.
 *
 * @return instancias dos campos
 */
public List<SInstance> getAllFields() {
  for (SType<?> field : getType().getFields())
    getField(field.getNameSimple());
  return getFields();
}
origin: org.opensingular/singular-form-core

/**
 * Procura o índice do elemento solicitado dentro da lista de campo ou
 * retorna -1 se o campo não existir no tipo composto.
 */
private int findFieldIndexOpt(PathReader pathReader) {
  if (pathReader.isIndex()) {
    throw new SingularFormException(pathReader.getErrorMsg(this, "Não é uma lista"), this);
  }
  return getType().findIndexOf(pathReader.getToken());
}
origin: org.opensingular/form-core

@Override
final <T> T getValueWithDefaultIfNull(PathReader pathReader, Class<T> resultClass) {
  SInstance instance = getFieldLocalWithoutCreating(pathReader);
  if (instance != null) {
    return instance.getValueWithDefaultIfNull(pathReader.next(), resultClass);
  }
  SType<?> tipo = SFormUtil.resolveFieldType(getType(), pathReader);
  return tipo.getAttributeValueOrDefaultValueIfNull(resultClass);
}
origin: org.opensingular/form-core

/**
 * Procura o índice do elemento solicitado dentro da lista de campo ou
 * retorna -1 se o campo não existir no tipo composto.
 */
private int findFieldIndexOpt(PathReader pathReader) {
  if (pathReader.isIndex()) {
    throw new SingularFormException(pathReader.getErrorMsg(this, "Não é uma lista"));
  }
  return getType().findIndexOf(pathReader.getToken());
}
origin: org.opensingular/singular-form-core

@Override
public void fillInstance(SInstance ins, T obj) {
  if (!(ins instanceof SIComposite)) {
    throw new SingularFormException("AutoSICompositeConverter somente funciona com instancias compostas.", ins);
  }
  final SIComposite   cins          = (SIComposite) ins;
  final GetterHandler getterHandler = new Mirror().on(obj).get();
  cins.getType().getFields().forEach(f -> cins.setValue(f, getterHandler.field(f.getNameSimple())));
}
origin: org.opensingular/form-core

@Override
public void fillInstance(SInstance ins, T obj) {
  if (!(ins instanceof SIComposite)) {
    throw new SingularFormException("AutoSICompositeConverter somente funciona com instancias compostas.");
  }
  final SIComposite   cins          = (SIComposite) ins;
  final GetterHandler getterHandler = new Mirror().on(obj).get();
  cins.getType().getFields().forEach(f -> cins.setValue(f, getterHandler.field(f.getNameSimple())));
}
origin: org.opensingular/singular-form-core

protected List<INSTANCE> executeSelectCommand(RelationalSQLCommmand command) {
  return db.query(command.getSQL(), command.getParameters(), command.getLimitOffset(), command.getLimitRows(),
      rs -> {
        INSTANCE instance = createInstance();
        command.setInstance(instance);
        FormKey.setOnInstance(instance, tupleKey(rs, RelationalSQL.tablePK(instance.getType())));
        RelationalSQL.persistenceStrategy(instance.getType()).load(instance, tuple(rs, command));
        return instance;
      });
}
origin: org.opensingular/singular-form-core

protected List<SIComposite> executeSelectCommandIntoSIList(RelationalSQLCommmand command,
    SIList<SIComposite> listInstance) {
  return db.query(command.getSQL(), command.getParameters(), command.getLimitOffset(), command.getLimitRows(),
      rs -> {
        SIComposite instance = listInstance.addNew();
        command.setInstance(instance);
        List<String> pk = RelationalSQL.tablePK(RelationalSQL.tableContext(instance.getType()));
        FormKey.setOnInstance(instance, tupleKey(rs, pk));
        RelationalSQL.persistenceStrategy(instance.getType()).load(instance, tuple(rs, command));
        return instance;
      });
}
org.opensingular.formSICompositegetType

Popular methods of SIComposite

  • getField
  • getFields
    List only those fields already instantiated. OBS: field instantiation occurs automatically when its
  • findNearest
  • getDocument
  • setValue
  • asAtr
  • findDescendant
  • getFieldList
  • asAtrAnnotation
  • asAtrBootstrap
  • clearInstance
  • createField
  • clearInstance,
  • createField,
  • findFieldIndex,
  • findFieldIndexOpt,
  • getAllChildren,
  • getAllFields,
  • getDictionary,
  • getFieldLocalWithoutCreating,
  • getFieldOpt

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now