io.vertx.codegen.annotations.GenIgnore Java Examples

The following examples show how to use io.vertx.codegen.annotations.GenIgnore. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 6 votes vote down vote up
/**
 * Get an array of  {@link String} value at {@code pos}.
 *
 * <p>Target element instance of {@code Object[]} will be
 * coerced to {@code String[]}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default String[] getStringArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof String[]) {
    return (String[]) val;
  } else if (val != null && val.getClass() == Object[].class) {
    Object[] array = (Object[]) val;
    String[] stringArray = new String[array.length];
    for (int i = 0;i < array.length;i++) {
      stringArray[i] = (String) array[i];
    }
    return stringArray;
  } else {
    return null;
  }
}
 
Example #2
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 6 votes vote down vote up
/**
 * Get an array of  {@link LocalTime} value at {@code pos}.
 *
 * <p>Target element instance of {@code LocalDateTime[]} will be
 * coerced to {@code LocalTime[]}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default LocalTime[] getLocalTimeArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof LocalTime[]) {
    return (LocalTime[]) val;
  } else if (val instanceof LocalDateTime[]) {
    LocalDateTime[] a = (LocalDateTime[]) val;
    int len = a.length;
    LocalTime[] arr = new LocalTime[len];
    for (int i = 0; i < len; i++) {
      LocalDateTime elt = a[i];
      if (elt != null) {
        arr[i] = elt.toLocalTime();
      }
    }
    return arr;
  } else {
    return null;
  }
}
 
Example #3
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 6 votes vote down vote up
/**
 * Get an array of {@link Boolean} value at {@code pos}.
 *
 * <p>Target element instance of {@code Object[]} will be
 * coerced to {@code Boolean[]}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default Boolean[] getBooleanArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof Boolean[]) {
    return (Boolean[]) val;
  } else if (val != null && val.getClass() == Object[].class) {
    Object[] array = (Object[]) val;
    Boolean[] booleanArray = new Boolean[array.length];
    for (int i = 0;i < array.length;i++) {
      booleanArray[i] = (Boolean) array[i];
    }
    return booleanArray;
  } else {
    return null;
  }
}
 
Example #4
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 6 votes vote down vote up
/**
 * Get an array of  {@link OffsetTime} value at {@code pos}.
 *
 * <p>Target element instance of {@code OffsetDateTime[]} will be
 * coerced to {@code OffsetTime[]}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default OffsetTime[] getOffsetTimeArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof OffsetTime[]) {
    return (OffsetTime[]) val;
  } else if (val instanceof OffsetDateTime[]) {
    OffsetDateTime[] a = (OffsetDateTime[]) val;
    int len = a.length;
    OffsetTime[] arr = new OffsetTime[len];
    for (int i = 0; i < len; i++) {
      OffsetDateTime elt = a[i];
      if (elt != null) {
        arr[i] = elt.toOffsetTime();
      }
    }
    return arr;
  } else {
    return null;
  }
}
 
Example #5
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get {@link java.time.LocalTime} value at {@code pos}.
 *
 * <p>Target element instance of {@code LocalDateTime} will be
 * coerced to {@code LocalTime}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default LocalTime getLocalTime(int pos) {
  Object val = getValue(pos);
  if (val instanceof LocalTime) {
    return (LocalTime) val;
  } else if (val instanceof LocalDateTime) {
    return ((LocalDateTime) val).toLocalTime();
  }
  return null;
}
 
Example #6
Source File: DB2ConnectOptions.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * @deprecated UNSTABLE FEATURE: Current default value is 1, anything higher
 *             than 1 will result in errors currently.
 * @param pipeliningLimit the number of commands that can simultaneously use the
 *                        same physical socket connection.
 * @return A reference to this, so the API can be used fluently
 */
@GenIgnore
@Deprecated // TODO: Get pipelining working properly, or remove this as API
public DB2ConnectOptions setPipeliningLimit(int pipeliningLimit) {
  if (pipeliningLimit < 1) {
    throw new IllegalArgumentException();
  }
  this.pipeliningLimit = pipeliningLimit;
  return this;
}
 
Example #7
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get an array of  {@link Temporal} value at {@code pos}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default Temporal[] getTemporalArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof Temporal[]) {
    return (Temporal[]) val;
  } else {
    return null;
  }
}
 
Example #8
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get an array of  {@link LocalDateTime} value at {@code pos}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default LocalDateTime[] getLocalDateTimeArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof LocalDateTime[]) {
    return (LocalDateTime[]) val;
  } else {
    return null;
  }
}
 
Example #9
Source File: PgConnectOptions.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
@GenIgnore
public SocketAddress getSocketAddress() {
  if (!isUsingDomainSocket()) {
    return super.getSocketAddress();
  } else {
    return SocketAddress.domainSocketAddress(getHost() + "/.s.PGSQL." + getPort());
  }
}
 
Example #10
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get an array of {@link UUID} value at {@code pos}.
 *
 * @param pos the column
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default UUID[] getUUIDArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof UUID[]) {
    return (UUID[]) val;
  } else {
    return null;
  }
}
 
Example #11
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get an array of  {@link OffsetDateTime} value at {@code pos}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default OffsetDateTime[] getOffsetDateTimeArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof OffsetDateTime[]) {
    return (OffsetDateTime[]) val;
  } else {
    return null;
  }
}
 
Example #12
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get {@link java.time.LocalDate} value at {@code pos}.
 *
 * <p>Target element instance of {@code LocalDateTime} will be
 * coerced to {@code LocalDate}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default LocalDate getLocalDate(int pos) {
  Object val = getValue(pos);
  if (val instanceof LocalDate) {
    return (LocalDate) val;
  } else if (val instanceof LocalDateTime) {
    return ((LocalDateTime) val).toLocalDate();
  }
  return null;
}
 
Example #13
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get {@link java.time.LocalDateTime} value at {@code pos}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default LocalDateTime getLocalDateTime(int pos) {
  Object val = getValue(pos);
  if (val instanceof LocalDateTime) {
    return (LocalDateTime) val;
  }
  return null;
}
 
Example #14
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get {@link java.time.OffsetTime} value at {@code pos}.
 *
 * <p>Target element instance of {@code OffsetDateTime} will be
 * coerced to {@code OffsetTime}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default OffsetTime getOffsetTime(int pos) {
  Object val = getValue(pos);
  if (val instanceof OffsetTime) {
    return (OffsetTime) val;
  } else if (val instanceof OffsetDateTime) {
    return ((OffsetDateTime)val).toOffsetTime();
  }
  return null;
}
 
Example #15
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get {@link java.time.OffsetDateTime} value at {@code pos}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default OffsetDateTime getOffsetDateTime(int pos) {
  Object val = getValue(pos);
  if (val instanceof OffsetDateTime) {
    return (OffsetDateTime) val;
  }
  return null;
}
 
Example #16
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get {@link java.util.UUID} value at {@code pos}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default UUID getUUID(int pos) {
  Object val = getValue(pos);
  if (val instanceof UUID) {
    return (UUID) val;
  } else if (val instanceof String) {
    return UUID.fromString((String) val);
  }
  return null;
}
 
Example #17
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get {@link BigDecimal} value at {@code pos}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default BigDecimal getBigDecimal(int pos) {
  Object val = getValue(pos);
  if (val instanceof BigDecimal) {
    return (BigDecimal) val;
  } else if (val instanceof Number) {
    return new BigDecimal(val.toString());
  }
  return null;
}
 
Example #18
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get an array of  {@link Short} value at {@code pos}.
 *
 * <p>Target element instance of {@code Number[]} or {@code Object[]} will be
 * coerced to {@code Short[]}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default Short[] getShortArray(int pos) {
  Object val = getValue(pos);
  if (val instanceof Short[]) {
    return (Short[]) val;
  } else if (val instanceof Number[]) {
    Number[] a = (Number[]) val;
    int len = a.length;
    Short[] arr = new Short[len];
    for (int i = 0; i < len; i++) {
      Number elt = a[i];
      if (elt != null) {
        arr[i] = elt.shortValue();
      }
    }
    return arr;
  } else if (val != null && val.getClass() == Object[].class) {
    Object[] array = (Object[]) val;
    Short[] shortArray = new Short[array.length];
    for (int i = 0;i < array.length;i++) {
      shortArray[i] = ((Number) array[i]).shortValue();
    }
    return shortArray;
  } else {
    return null;
  }
}
 
Example #19
Source File: MySQLAuthOptions.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Add a property for this client, which will be sent to server at the re-authentication.
 *
 * @param key   the value of property key
 * @param value the value of property value
 * @return a reference to this, so the API can be used fluently
 */
@GenIgnore
public MySQLAuthOptions addProperty(String key, String value) {
  Objects.requireNonNull(key, "Property key can not be null");
  Objects.requireNonNull(value, "Property value can not be null");
  this.properties.put(key, value);
  return this;
}
 
Example #20
Source File: Tuple.java    From vertx-sql-client with Apache License 2.0 5 votes vote down vote up
/**
 * Get an array of  {@link JsonObject} value at {@code pos}.
 *
 * @param pos the position
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default JsonObject[] getJsonObjectArray(int pos) {
  Object val = getValue(pos);
  if (val != null && val.getClass() == Object[].class) {
    Object[] array = (Object[]) val;
    JsonObject[] jsonObjectArray = new JsonObject[array.length];
    for (int i = 0;i < array.length;i++) {
      jsonObjectArray[i] = (JsonObject) array[i];
    }
    return jsonObjectArray;
  } else {
    return null;
  }
}
 
Example #21
Source File: MicrometerMetricsOptions.java    From vertx-micrometer-metrics with Apache License 2.0 5 votes vote down vote up
/**
 * Add a labels to enable. These labels can be fine-tuned later on using Micrometer's Meter filters (see http://micrometer.io/docs/concepts#_meter_filters)
 *
 * @param labels the labels to enable
 * @return a reference to this, so that the API can be used fluently
 */
@GenIgnore
public MicrometerMetricsOptions addLabels(Label... labels) {
  if (this.labels == null) {
    this.labels = EnumSet.noneOf(Label.class);
  }
  this.labels.addAll(Arrays.asList(labels));
  return this;
}
 
Example #22
Source File: MicrometerMetricsOptions.java    From vertx-micrometer-metrics with Apache License 2.0 5 votes vote down vote up
/**
 * Set metric that will not be registered. Schedulers will check the set {@code disabledMetricsCategories} when
 * registering metrics suppliers
 *
 * @param metricsDomain the type of metrics
 * @return a reference to this, so that the API can be used fluently
 */
@GenIgnore
public MicrometerMetricsOptions addDisabledMetricsCategory(MetricsDomain metricsDomain) {
  if (disabledMetricsCategories == null) {
    disabledMetricsCategories = EnumSet.noneOf(MetricsDomain.class);
  }
  this.disabledMetricsCategories.add(metricsDomain);
  return this;
}
 
Example #23
Source File: MySQLConnectOptions.java    From vertx-sql-client with Apache License 2.0 4 votes vote down vote up
@GenIgnore
@Override
public MySQLConnectOptions setPreparedStatementCacheSqlFilter(Predicate<String> predicate) {
  return (MySQLConnectOptions) super.setPreparedStatementCacheSqlFilter(predicate);
}
 
Example #24
Source File: PgConnectOptions.java    From vertx-sql-client with Apache License 2.0 4 votes vote down vote up
@GenIgnore
@Override
public PgConnectOptions setPreparedStatementCacheSqlFilter(Predicate<String> predicate) {
  return (PgConnectOptions) super.setPreparedStatementCacheSqlFilter(predicate);
}
 
Example #25
Source File: CassandraRowStream.java    From vertx-cassandra-client with Apache License 2.0 4 votes vote down vote up
@GenIgnore(GenIgnore.PERMITTED_TYPE)
@Override
default Future<Void> pipeTo(WriteStream<Row> dst) {
  return ReadStream.super.pipeTo(dst);
}
 
Example #26
Source File: DB2ConnectOptions.java    From vertx-sql-client with Apache License 2.0 4 votes vote down vote up
@GenIgnore
@Override
public DB2ConnectOptions addProperty(String key, String value) {
  return (DB2ConnectOptions) super.addProperty(key, value);
}
 
Example #27
Source File: SqlConnectOptions.java    From vertx-sql-client with Apache License 2.0 4 votes vote down vote up
@GenIgnore
public SocketAddress getSocketAddress() {
  return SocketAddress.inetSocketAddress(getPort(), getHost());
}
 
Example #28
Source File: BookDatabaseService.java    From vertx-postgresql-starter with MIT License 4 votes vote down vote up
@GenIgnore
static com.billyyccc.database.reactivex.BookDatabaseService createProxy(Vertx vertx, String address) {
  return new com.billyyccc.database.reactivex.BookDatabaseService(new BookDatabaseServiceVertxEBProxy(vertx, address));
}
 
Example #29
Source File: MicrometerMetricsOptions.java    From vertx-micrometer-metrics with Apache License 2.0 4 votes vote down vote up
/**
 * Is the given metrics category disabled?
 * @return true if it is disabled
 */
@GenIgnore
public boolean isMetricsCategoryDisabled(MetricsDomain metricsDomain) {
  return disabledMetricsCategories != null && disabledMetricsCategories.contains(metricsDomain);
}
 
Example #30
Source File: Row.java    From vertx-sql-client with Apache License 2.0 2 votes vote down vote up
/**
 * Get an array of {@link UUID} value at {@code pos}.
 *
 * @param name the column
 * @return the value or {@code null}
 */
@GenIgnore(GenIgnore.PERMITTED_TYPE)
default UUID[] getUUIDArray(String name) {
  int pos = getColumnIndex(name);
  return pos == -1 ? null : getUUIDArray(pos);
}