method2testcases stringlengths 118 6.63k |
|---|
### Question:
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { @NonNull static LocationCollectionClient getInstance() { synchronized (lock) { if (locationCollectionClient != null) { return locationCollectionClient; } else { throw new IllegalStateException("LocationCollectionClien... |
### Question:
LocationCollectionClient implements SharedPreferences.OnSharedPreferenceChangeListener { static boolean uninstall() { boolean uninstalled = false; synchronized (lock) { if (locationCollectionClient != null) { locationCollectionClient.locationEngineController.onDestroy(); locationCollectionClient.settingsC... |
### Question:
LocationUpdatesBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { try { if (intent == null) { Log.w(TAG, "intent == null"); return; } final String action = intent.getAction(); if (!ACTION_LOCATION_UPDATED.equals(action)) { return; } LocationEngi... |
### Question:
AlarmReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { try { if (SCHEDULER_FLUSHER_INTENT.equals(intent.getAction())) { callback.onPeriodRaised(); } } catch (Throwable throwable) { Log.e(TAG, throwable.toString()); } } AlarmReceiver(@NonNull SchedulerCa... |
### Question:
AlarmReceiver extends BroadcastReceiver { Intent supplyIntent() { return new Intent(SCHEDULER_FLUSHER_INTENT); } AlarmReceiver(@NonNull SchedulerCallback callback); @Override void onReceive(Context context, Intent intent); }### Answer:
@Test public void checksSupplyIntent() throws Exception { SchedulerCa... |
### Question:
MapboxTelemetry implements FullQueueCallback, ServiceTaskCallback { public boolean push(Event event) { if (sendEventIfWhitelisted(event)) { return true; } return pushToQueue(event); } MapboxTelemetry(Context context, String accessToken, String userAgent); MapboxTelemetry(Context context, String accessTo... |
### Question:
MapboxTelemetry implements FullQueueCallback, ServiceTaskCallback { public boolean enable() { if (TelemetryEnabler.isEventsEnabled(applicationContext)) { startTelemetry(); return true; } return false; } MapboxTelemetry(Context context, String accessToken, String userAgent); MapboxTelemetry(Context conte... |
### Question:
MapboxTelemetry implements FullQueueCallback, ServiceTaskCallback { public boolean disable() { if (TelemetryEnabler.isEventsEnabled(applicationContext)) { stopTelemetry(); return true; } return false; } MapboxTelemetry(Context context, String accessToken, String userAgent); MapboxTelemetry(Context conte... |
### Question:
MapboxTelemetry implements FullQueueCallback, ServiceTaskCallback { public boolean updateAccessToken(String accessToken) { if (isAccessTokenValid(accessToken) && updateTelemetryClient(accessToken)) { sAccessToken.set(accessToken); return true; } return false; } MapboxTelemetry(Context context, String acce... |
### Question:
MapboxTelemetry implements FullQueueCallback, ServiceTaskCallback { public boolean addTelemetryListener(TelemetryListener listener) { return telemetryListeners.add(listener); } MapboxTelemetry(Context context, String accessToken, String userAgent); MapboxTelemetry(Context context, String accessToken, St... |
### Question:
MapboxTelemetry implements FullQueueCallback, ServiceTaskCallback { public boolean addAttachmentListener(AttachmentListener listener) { return attachmentListeners.add(listener); } MapboxTelemetry(Context context, String accessToken, String userAgent); MapboxTelemetry(Context context, String accessToken,... |
### Question:
LocationEngineProvider { @NonNull @Deprecated public static LocationEngine getBestLocationEngine(@NonNull Context context, boolean background) { return getBestLocationEngine(context); } private LocationEngineProvider(); @NonNull @Deprecated static LocationEngine getBestLocationEngine(@NonNull Context con... |
### Question:
AtlasJavaModelFactory { public static JavaClass createJavaClass() { JavaClass javaClass = new JavaClass(); javaClass.setJavaEnumFields(new JavaEnumFields()); javaClass.setJavaFields(new JavaFields()); return javaClass; } static JavaClass createJavaClass(); static JavaField createJavaField(); static Field... |
### Question:
CharacterConverter implements AtlasConverter<Character> { @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = FieldType.BYTE, concerns = { AtlasConversionConcern.RANGE }) public Byte toByte(Character value) throws AtlasConversionException { if (value == null) { return null; } if (value.charValu... |
### Question:
CharacterConverter implements AtlasConverter<Character> { @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = FieldType.CHAR) public Character toCharacter(Character value) { if (value == null) { return null; } return new Character(value); } @AtlasConversionInfo(sourceType = FieldType.CHAR, tar... |
### Question:
CharacterConverter implements AtlasConverter<Character> { @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = FieldType.DOUBLE) public Double toDouble(Character value) { if (value == null) { return null; } return Double.valueOf(value); } @AtlasConversionInfo(sourceType = FieldType.CHAR, target... |
### Question:
CharacterConverter implements AtlasConverter<Character> { @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = FieldType.FLOAT) public Float toFloat(Character value) { if (value == null) { return null; } return Float.valueOf(value); } @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType... |
### Question:
CharacterConverter implements AtlasConverter<Character> { @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = FieldType.INTEGER) public Integer toInteger(Character value) { if (value == null) { return null; } return Integer.valueOf(value); } @AtlasConversionInfo(sourceType = FieldType.CHAR, ta... |
### Question:
CharacterConverter implements AtlasConverter<Character> { @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = FieldType.LONG) public Long toLong(Character value) { if (value == null) { return null; } return Long.valueOf(value); } @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = F... |
### Question:
CharacterConverter implements AtlasConverter<Character> { @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = FieldType.SHORT, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Short toShort(Character value) throws AtlasConversionException { if (value == nul... |
### Question:
CharacterConverter implements AtlasConverter<Character> { @AtlasConversionInfo(sourceType = FieldType.CHAR, targetType = FieldType.STRING) public String toString(Character value, String sourceFormat, String targetFormat) { if (value == null) { return null; } return String.valueOf(value); } @AtlasConversi... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BOOLEAN, concerns = {AtlasConversionConcern.CONVENTION}) public Boolean toBoolean(Byte value) { if (value == null) { return null; } return value.byteValue() != 0; } @AtlasConversionInf... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BYTE) public Byte toByte(Byte value) { return value != null ? new Byte(value) : null; } @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECIMAL) BigDecimal toB... |
### Question:
MavenClasspathHelper { public String generateClasspathFromPom(String pom) throws Exception { if (pom == null || pom.isEmpty()) { return null; } if (LOG.isDebugEnabled()) { LOG.debug("Generating classpath from pom:\n" + pom); } Path workingDirectory = createWorkingDirectory(); Path pomFile = Paths.get(work... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.CHAR) public Character toCharacter(Byte value) { return value != null ? (char) value.byteValue() : null; } @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECI... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DOUBLE) public Double toDouble(Byte value) { return value != null ? (double) value : null; } @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECIMAL) BigDecima... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.FLOAT) public Float toFloat(Byte value) { return value != null ? (float) value : null; } @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECIMAL) BigDecimal to... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.INTEGER) public Integer toInteger(Byte value) { return value != null ? (int) value : null; } @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECIMAL) BigDecima... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.LONG) public Long toLong(Byte value) { return value != null ? (long) value : null; } @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECIMAL) BigDecimal toBigD... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.SHORT) public Short toShort(Byte value) { return value != null ? (short) value : null; } @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECIMAL) BigDecimal to... |
### Question:
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.STRING, concerns = {AtlasConversionConcern.CONVENTION}) public String toString(Byte value) { return value != null ? String.valueOf(value) : null; } @AtlasConversionInfo(sourceType = Fi... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.BOOLEAN, concerns = { AtlasConversionConcern.CONVENTION }) public Boolean toBoolean(Integer value) { if (value == null) { return null; } return value == 0 ? Boolean.FALSE : Boo... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.BYTE, concerns = AtlasConversionConcern.RANGE) public Byte toByte(Integer value) throws AtlasConversionException { if (value == null) { return null; } if (value >= Byte.MIN_VAL... |
### Question:
JavaFieldWriterUtil { public Object getChildObject(Object parentObject, SegmentContext segment) throws AtlasException { String fieldName = segment.getName(); if (LOG.isDebugEnabled()) { LOG.debug( "Retrieving child '" + fieldName + "'.\n\tparentObject: " + parentObject); } if (parentObject == null) { if (... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Character toCharacter(Integer value) throws AtlasConversionException { if (value ==... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.DOUBLE) public Double toDouble(Integer value) { return value != null ? value.doubleValue() : null; } @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldTyp... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.FLOAT, concerns = AtlasConversionConcern.RANGE) public Float toFloat(Integer value) { return value != null ? value.floatValue() : null; } @AtlasConversionInfo(sourceType = Fie... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.SHORT, concerns = AtlasConversionConcern.RANGE) public Short toShort(Integer value) throws AtlasConversionException { if (value == null) { return null; } if (value > Short.MAX_... |
### Question:
JavaFieldWriterUtil { public Class<?> getDefaultCollectionImplClass(CollectionType type) { if (type == CollectionType.LIST) { return this.defaultCollectionImplClasses.get(List.class); } else if (type == CollectionType.MAP) { return this.defaultCollectionImplClasses.get(Map.class); } return null; } JavaFie... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.LONG) public Long toLong(Integer value) { return value != null ? value.longValue() : null; } @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.DECIMA... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.STRING) public String toString(Integer value) { return value != null ? String.valueOf(value) : null; } @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldT... |
### Question:
IntegerConverter implements AtlasConverter<Integer> { @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = FieldType.INTEGER) public Integer toInteger(Integer value) { return value != null ? Integer.valueOf(value) : null; } @AtlasConversionInfo(sourceType = FieldType.INTEGER, targetType = Fi... |
### Question:
SqlTimestampConverter implements AtlasConverter<Timestamp> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) public Date toDate(Timestamp timestamp) { return timestamp != null ? Date.from(timestamp.toInstant()) : null; } @AtlasConversionInfo(sourceType = FieldType... |
### Question:
StringUtil { public static String getFieldNameFromGetter(String getter) { if (StringUtil.isEmpty(getter)) { return getter; } String subGetter; if (getter.startsWith("get")) { if (getter.length() <= "get".length()) { return getter; } subGetter = getter.substring("get".length()); } else if (getter.startsWit... |
### Question:
JavaFieldReader implements AtlasFieldReader { @Override public Field read(AtlasInternalSession session) throws AtlasException { try { Field field = session.head().getSourceField(); if (sourceDocument == null) { AtlasUtil.addAudit(session, field.getDocId(), String.format( "Unable to read sourceField (path=... |
### Question:
DoubleConverter implements AtlasConverter<Double> { @AtlasConversionInfo(sourceType = FieldType.DOUBLE, targetType = FieldType.DOUBLE) public Double toDouble(Double value) { return value != null ? Double.valueOf(value) : null; } @AtlasConversionInfo(sourceType = FieldType.DOUBLE, targetType = FieldType.D... |
### Question:
AtlasJsonModelFactory { public static JsonDocument createJsonDocument() { JsonDocument jsonDocument = new JsonDocument(); jsonDocument.setFields(new Fields()); return jsonDocument; } static JsonDocument createJsonDocument(); static JsonField createJsonField(); static String toString(JsonField f); static ... |
### Question:
DoubleConverter implements AtlasConverter<Double> { @AtlasConversionInfo(sourceType = FieldType.DOUBLE, targetType = FieldType.STRING) public String toString(Double value) { return value != null ? String.valueOf(value) : null; } @AtlasConversionInfo(sourceType = FieldType.DOUBLE, targetType = FieldType.D... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BOOLEAN) public Boolean toBoolean(Boolean value, String sourceFormat, String targetFormat) { return value != null ? Boolean.valueOf(value) : null; } @AtlasConversionInfo(sourc... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BYTE) public Byte toByte(Boolean value) { return value != null ? (byte) (value ? 1 : 0) : null; } @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.D... |
### Question:
JsonService { protected boolean validJsonData(String jsonData) { if (jsonData == null || jsonData.isEmpty()) { return false; } return jsonData.startsWith("{") || jsonData.startsWith("["); } @GET @Path("/simple") @Produces(MediaType.TEXT_PLAIN) @Operation(summary ="Simple", description = "Simple hello ser... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.CHAR) public Character toCharacter(Boolean value) { return value != null ? (char) (value ? 1 : 0) : null; } @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = F... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.DOUBLE) public Double toDouble(Boolean value) { return value != null ? value ? 1.0d : 0.0d : null; } @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldTyp... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.FLOAT) public Float toFloat(Boolean value) { return value != null ? (value ? 1.0f : 0.0f) : null; } @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) public Integer toInteger(Boolean value) { return value != null ? (value ? 1 : 0) : null; } @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.LONG) public Long toLong(Boolean value) { return value != null ? (value ? 1L : 0L) : null; } @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.DECIMA... |
### Question:
JsonModule extends BaseAtlasModule { @Override public Boolean isSupportedField(Field field) { if (super.isSupportedField(field)) { return true; } return field instanceof JsonField; } @Override void processPreValidation(AtlasInternalSession atlasSession); @Override void processPreSourceExecution(AtlasInte... |
### Question:
JavaService { @GET @Path("/class") @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "Inspect Class", description ="Inspect a Java Class with specified fully qualified class name and return a Document object") @ApiResponses(@ApiResponse(responseCode = "200", content = @Content(schema = @Schema(im... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.SHORT) public Short toShort(Boolean value) { return value != null ? (short) (value ? 1 : 0) : null; } @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldTy... |
### Question:
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.STRING, concerns = { AtlasConversionConcern.CONVENTION }) public String toString(Boolean value, String sourceFormat, String targetFormat) { if (value == null) { return null; } ... |
### Question:
JsonFieldWriter implements AtlasFieldWriter { @Override public void write(AtlasInternalSession session) throws AtlasException { Field targetField = session.head().getTargetField(); if (targetField == null) { throw new AtlasException(new IllegalArgumentException("Argument 'jsonField' cannot be null")); } i... |
### Question:
JsonFieldWriter implements AtlasFieldWriter { public ContainerNode<?> getRootNode() { return rootNode; } JsonFieldWriter(); JsonFieldWriter(ObjectMapper objectMapper); ContainerNode<?> getRootNode(); ObjectMapper getObjectMapper(); @Override void write(AtlasInternalSession session); }### Answer:
@Test p... |
### Question:
StringConverter implements AtlasConverter<String> { @AtlasConversionInfo(sourceType = FieldType.STRING, targetType = FieldType.STRING) public String toString(String value, String sourceFormat, String targetFormat) { if (value == null) { return null; } return new String(value); } @AtlasConversionInfo(sour... |
### Question:
LocalDateConverter implements AtlasConverter<LocalDate> { @AtlasConversionInfo(sourceType = FieldType.DATE, targetType = FieldType.DATE_TIME) public Date toDate(LocalDate value) { return value != null ? new Date(getStartEpochMilli(value)) : null; } @AtlasConversionInfo(sourceType = FieldType.DATE, target... |
### Question:
LocalDateConverter implements AtlasConverter<LocalDate> { @AtlasConversionInfo(sourceType = FieldType.DATE, targetType = FieldType.DATE_TIME_TZ) public ZonedDateTime toZonedDateTime(LocalDate value) { return value != null ? value.atStartOfDay(ZoneId.systemDefault()) : null; } @AtlasConversionInfo(sourceT... |
### Question:
FloatConverter implements AtlasConverter<Float> { @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.BOOLEAN, concerns = { AtlasConversionConcern.CONVENTION }) public Boolean toBoolean(Float value) { if (value == null) { return null; } if (value == 0.0) { return Boolean.FALSE; } ret... |
### Question:
FloatConverter implements AtlasConverter<Float> { @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DOUBLE) public Double toDouble(Float value) { if (value == null) { return null; } return value.doubleValue(); } @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = Field... |
### Question:
FloatConverter implements AtlasConverter<Float> { @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.FLOAT) public Float toFloat(Float value) { if (value == null) { return null; } return value.floatValue(); } @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType... |
### Question:
AtlasXmlModelFactory { public static XmlDocument createXmlDocument() { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.setFields(new Fields()); return xmlDocument; } static XmlDocument createXmlDocument(); static XmlField createXmlField(); static XmlField cloneField(XmlField field, boolean withA... |
### Question:
XmlModule extends BaseAtlasModule { @Override public Boolean isSupportedField(Field field) { if (super.isSupportedField(field)) { return true; } return field instanceof XmlField; } @Override void init(); @Override void processPreValidation(AtlasInternalSession atlasSession); @Override void processPreSour... |
### Question:
FloatConverter implements AtlasConverter<Float> { @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.STRING) public String toString(Float value) { return value != null ? String.valueOf(value) : null; } @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DECIMA... |
### Question:
GregorianCalendarConverter implements AtlasConverter<GregorianCalendar> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME_TZ, targetType = FieldType.DATE_TIME) public Date toDate(GregorianCalendar calendar) { return zdtConverter.toDate(calendar.toZonedDateTime()); } @AtlasConversionInfo(sourceType ... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.BOOLEAN, concerns = AtlasConversionConcern.CONVENTION) public Boolean toBoolean(Short value) { if (value == null) { return null; } return value == 0 ? Boolean.FALSE : Boolean.TRUE; }... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.BYTE, concerns = AtlasConversionConcern.RANGE) public Byte toByte(Short value) throws AtlasConversionException { if (value == null) { return null; } if (value >= Byte.MIN_VALUE && va... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Character toCharacter(Short value) throws AtlasConversionException { if (value == null) {... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.DOUBLE) public Double toDouble(Short value) { if (value == null) { return null; } return value.doubleValue(); } @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = Field... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.FLOAT) public Float toFloat(Short value) { if (value == null) { return null; } return value.floatValue(); } @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.INTEGER) public Integer toInteger(Short value) { if (value == null) { return null; } return value.intValue(); } @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = Field... |
### Question:
JavaModule extends BaseAtlasModule { @Override public Boolean isSupportedField(Field field) { if (super.isSupportedField(field)) { return true; } return field instanceof JavaField || field instanceof JavaEnumField; } JavaModule(); @Override void init(); @Override void destroy(); @Override void processPreV... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.LONG) public Long toLong(Short value) { return value != null ? value.longValue() : null; } @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.DECIMAL) BigDeci... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.SHORT) public Short toShort(Short value) { return value != null ? new Short(value) : null; } @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.DECIMAL) BigDe... |
### Question:
ShortConverter implements AtlasConverter<Short> { @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.STRING) public String toString(Short value) { return value != null ? String.valueOf(value) : null; } @AtlasConversionInfo(sourceType = FieldType.SHORT, targetType = FieldType.DECIMA... |
### Question:
StringPatternValidator implements AtlasValidator { @Override public boolean supports(Class<?> clazz) { return String.class.isAssignableFrom(clazz); } StringPatternValidator(ValidationScope scope, String violationMessage, String pattern); StringPatternValidator(ValidationScope scope, String violationMessa... |
### Question:
StringPatternValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } StringPatternValidator(ValidationScope scope, String violationMessage, String pattern); StringPatternVal... |
### Question:
CompositeValidator implements AtlasValidator { @Override public boolean supports(Class<?> clazz) { for (AtlasValidator validator : validators) { if (validator.supports(clazz)) { return true; } } return false; } CompositeValidator(List<AtlasValidator> validators); CompositeValidator(AtlasValidator... vali... |
### Question:
LookupTableNameValidator implements AtlasValidator { @Override public boolean supports(Class<?> clazz) { return LookupTables.class.isAssignableFrom(clazz); } LookupTableNameValidator(String violationMessage); @Override boolean supports(Class<?> clazz); @Override void validate(Object target, List<Validatio... |
### Question:
LookupTableNameValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } LookupTableNameValidator(String violationMessage); @Override boolean supports(Class<?> clazz); @Overrid... |
### Question:
NotEmptyValidator implements AtlasValidator { @Override public boolean supports(Class<?> clazz) { return clazz.isAssignableFrom(List.class) || clazz.isAssignableFrom(Map.class) || clazz.isAssignableFrom(Set.class) || clazz.isAssignableFrom(Collection.class); } NotEmptyValidator(ValidationScope scope, Stri... |
### Question:
NotEmptyValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } NotEmptyValidator(ValidationScope scope, String violationMessage); @Override boolean supports(Class<?> clazz);... |
### Question:
StringLengthValidator implements AtlasValidator { @Override public boolean supports(Class<?> clazz) { return String.class.isAssignableFrom(clazz); } StringLengthValidator(ValidationScope scope, String violationMessage, int minLength, int maxLength); @Override boolean supports(Class<?> clazz); @Override vo... |
### Question:
StringLengthValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } StringLengthValidator(ValidationScope scope, String violationMessage, int minLength, int maxLength); @Over... |
### Question:
NonNullValidator implements AtlasValidator { @Override public boolean supports(Class<?> clazz) { return true; } NonNullValidator(ValidationScope scope, String violationMessage); @Override boolean supports(Class<?> clazz); @Override void validate(Object target, List<Validation> validations, String id); @Ov... |
### Question:
NonNullValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } NonNullValidator(ValidationScope scope, String violationMessage); @Override boolean supports(Class<?> clazz); @... |
### Question:
PositiveIntegerValidator implements AtlasValidator { @Override public boolean supports(Class<?> clazz) { return Integer.class.isAssignableFrom(clazz) || String.class.isAssignableFrom(clazz); } PositiveIntegerValidator(ValidationScope scope, String violationMessage); @Override boolean supports(Class<?> cla... |
### Question:
PositiveIntegerValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { this.validate(target, validations, id, ValidationStatus.ERROR); } PositiveIntegerValidator(ValidationScope scope, String violationMessage); @Override boolean suppor... |
### Question:
AtlasPath { public SegmentContext getLastSegmentParent() { if (this.segmentContexts.isEmpty() || this.segmentContexts.size() == 1) { return null; } return this.segmentContexts.get(this.segmentContexts.size() - 2); } AtlasPath(String p); protected AtlasPath(List<SegmentContext> segments); private AtlasPa... |
### Question:
AtlasPath { public AtlasPath getLastSegmentParentPath() { if (this.segmentContexts.isEmpty() || this.segmentContexts.size() == 1) { return null; } AtlasPath parentPath = new AtlasPath(); for (int i = 0; i < this.segmentContexts.size() - 1; i++) { parentPath.appendField(this.segmentContexts.get(i).getExpre... |
### Question:
AtlasPath { public boolean isIndexedCollection() { boolean hasIndexedCollection = false; for (SegmentContext sc : this.segmentContexts) { if (sc.getCollectionType() != CollectionType.NONE) { if (sc.getCollectionIndex() != null) { hasIndexedCollection = true; } } } return hasIndexedCollection; } AtlasPath(... |
### Question:
AtlasPath { public SegmentContext getLastSegment() { return this.segmentContexts.get(this.segmentContexts.size()-1); } AtlasPath(String p); protected AtlasPath(List<SegmentContext> segments); private AtlasPath(); static Field extractChildren(Field f, String path); static void setCollectionIndexRecursive... |
### Question:
AtlasPath { public boolean hasCollection() { for (SegmentContext sc : this.segmentContexts) { if (sc.getCollectionType() != CollectionType.NONE) { return true; } } return false; } AtlasPath(String p); protected AtlasPath(List<SegmentContext> segments); private AtlasPath(); static Field extractChildren(F... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.