![JAR search and dependency download from the Maven repository](/logo.png)
NannoqRepositoryServicesInternal.internal_repository_service.rb Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of repository Show documentation
Show all versions of repository Show documentation
Repository Layer of Nannoq Tools
require 'vertx/util/utils.rb'
# Generated from com.nannoq.tools.repository.services.internal.InternalRepositoryService
module NannoqRepositoryServicesInternal
module InternalRepositoryService
# @param [Object] record
# @yield
# @return [self]
def remote_create(record=nil)
if @j_arg_T.accept?(record) && block_given?
@j_del.java_method(:remoteCreate, [Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(@j_arg_T.unwrap(record),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? @j_arg_T.wrap(ar.result) : nil) }))
return self
end
raise ArgumentError, "Invalid arguments when calling remote_create(#{record})"
end
# @param [Hash{String => Object}] identifiers
# @yield
# @return [self]
def remote_read(identifiers=nil)
if identifiers.class == Hash && block_given?
@j_del.java_method(:remoteRead, [Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_json_object(identifiers),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? @j_arg_T.wrap(ar.result) : nil) }))
return self
end
raise ArgumentError, "Invalid arguments when calling remote_read(#{identifiers})"
end
# @param [Object] record
# @yield
# @return [self]
def remote_update(record=nil)
if @j_arg_T.accept?(record) && block_given?
@j_del.java_method(:remoteUpdate, [Java::java.lang.Object.java_class,Java::IoVertxCore::Handler.java_class]).call(@j_arg_T.unwrap(record),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? @j_arg_T.wrap(ar.result) : nil) }))
return self
end
raise ArgumentError, "Invalid arguments when calling remote_update(#{record})"
end
# @param [Hash{String => Object}] identifiers
# @yield
# @return [self]
def remote_delete(identifiers=nil)
if identifiers.class == Hash && block_given?
@j_del.java_method(:remoteDelete, [Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(::Vertx::Util::Utils.to_json_object(identifiers),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? @j_arg_T.wrap(ar.result) : nil) }))
return self
end
raise ArgumentError, "Invalid arguments when calling remote_delete(#{identifiers})"
end
end
class InternalRepositoryServiceImpl
include InternalRepositoryService
# @private
# @param j_del [::NannoqRepositoryServicesInternal::InternalRepositoryService] the java delegate
def initialize(j_del, j_arg_T=nil)
@j_del = j_del
@j_arg_T = j_arg_T != nil ? j_arg_T : ::Vertx::Util::unknown_type
end
# @private
# @return [::NannoqRepositoryServicesInternal::InternalRepositoryService] the underlying java delegate
def j_del
@j_del
end
end
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy