Examples of JIVariant


Examples of org.jinterop.dcom.core.JIVariant

   * Содержит код элемента плана счетов. Строка или число в зависимости от настроек плана счетов в конфигураторе.
   * @return
   * @throws JIException
   */
  public String getCode() throws JIException{
    JIVariant var = get("Code");
    String res = null;
    if (var.getType() != JIVariant.VT_BSTR) {
      res = String.valueOf(var.getObjectAsInt());
    } else {
      res = var.getObjectAsString2();
    }
    return res;
  }
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

      throws JIException {
    if (variant == null) {
      variant = new JIVariant[0];
    }
    Object[] params = new Object[1 + variant.length];
    params[0] = new JIVariant(aName);
    for (int z = 0; z < variant.length; z++) {
      params[z + 1] = variant[z];
    }
    JIVariant[] obj = callMethodA("NewObject", params);
    return (obj.length == 0) ? null : ComApp.toDispatch(obj[0]);
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

   *            - размер массива
   * @return экземпляр массива
   * @throws JIException
   */
  public OCArray newArray(int size) throws JIException {
    return new OCArray(newObject("Array", new JIVariant(size)));
  }
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

   *            соответствующий XML тип.
   * @return OCXMLDataType
   * @throws JIException
   */
  public final OCXMLDataType getXMLType(OCType type) throws JIException {
    return new OCXMLDataType(callMethodA("XMLType", new JIVariant(ocObject2Dispatch(type)))[0]);
  }
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

   *         ДопустимаяДлина, ЧастиДаты) или все ссылки на объекты базы
   *         данных.
   * @throws JIException
   */
  public final OCVariant getXMLValue(OCType type, String xmlString) throws JIException {
    return new OCVariant(callMethodA("XMLValue", new Object[]{new JIVariant(ocObject2Dispatch(type)), new JIVariant(xmlString)})[0]);
  }
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

   * @param reader - Объект, через который производится чтение XML.
   * @return Истина - тип 1С:Предприятия существует; Ложь - в противном случае.
   * @throws JIException
   */
  public boolean canReadXML(OCXMLReader reader) throws JIException {
    return callMethodA("CanReadXML", new JIVariant(ocObject2Dispatch(reader)))[0].getObjectAsBoolean();
  }
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

   *         возвращает Неопределено.
   * @throws JIException
   */
  public OCXMLDataType getXMLTypeOf(Object object) throws JIException {
    OCVariant var = new OCVariant(object);
    JIVariant jVar = callMethodA("XMLTypeOf", var.getJIVariant())[0];
    if (jVar.getType() != JIVariant.VT_EMPTY) {
      return new OCXMLDataType(jVar);
    } else {
      return null;
    }
  }
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

   *            элемента или значение атрибута XML.
   * @return String
   * @throws JIException ошибка DCOM
   */
  public final String getXMLString(final Object object) throws JIException {
    JIVariant arg = null;
    if (object instanceof OCObject) {
      arg = new JIVariant(ocObject2Dispatch((OCObject) object));
    } else {
      arg = JIVariant.makeVariant(object);
    }
    return callMethodA("XMLString", arg)[0].getObjectAsString2();
  }
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

   * @param xmlDataType - Тип XML, для которого нужно получить соответствующий тип.
   * @return Тип, Неопределено. Неопределено, если соответствующий тип данных не обнаружен.
   * @throws JIException
   */
  public OCType fromXMLType(OCXMLDataType xmlDataType) throws JIException {
    JIVariant var = callMethodA("FromXMLType", new JIVariant(ocObject2Dispatch(xmlDataType)))[0];
    if (var.getType() != JIVariant.VT_EMPTY) {
      return new OCType(var);
    } else {
      return null;
    }
  }
View Full Code Here

Examples of org.jinterop.dcom.core.JIVariant

   * @param namespace - URI пространства имен типа XML.
   * @return Тип, Неопределено. Неопределено, если соответствующий тип данных не обнаружен.
   * @throws JIException
   */
  public OCType fromXMLType(String xmlTypeName, String namespace) throws JIException {
    JIVariant var = callMethodA("FromXMLType", new Object[]{new JIVariant(xmlTypeName), new JIVariant(namespace)})[0];
    if (var.getType() != JIVariant.VT_EMPTY) {
      return new OCType(var);
    } else {
      return null;
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.