Java::JCR::Query::Query - Perl wrapper for javax.jcr.query.Query


Java-JCR documentation Contained in the Java-JCR distribution.

Index


Code Index:

NAME

Top

Java::JCR::Query::Query - Perl wrapper for javax.jcr.query.Query

DESCRIPTION

Top

This is an automatically generated package wrapping javax.jcr.query.Query with a nice Perlish API.

For full documentation of what this class does, see the Java API documentation: http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/query/Query.html

The deviations from the API documentation include the following:

SEE ALSO

Top

Java::JCR, http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/query/Query.html

AUTHOR

Top

Andrew Sterling Hanenkamp, <hanenkamp@cpan.org>

LICENSE AND COPYRIGHT

Top


Java-JCR documentation Contained in the Java-JCR distribution.

package Java::JCR::Query::Query;

# This code was automatically generated by a combination of the
# JCRPackageGenerator.java and package-generator.pl programs. These are both
# distributed in the inc/ directory of the Java-JCR distribution. You should
# be able to find the latest Java-JCR distribution at:
#
#   http://search.cpan.org/~hanenkamp/Java-JCR/
#

use strict;
use warnings;

use base qw( Java::JCR::Base );

our $VERSION = '0.07';

use Carp;
use Inline (
    Java => 'STUDY',
    STUDY => [],
);
use Inline::Java qw( study_classes );

study_classes(['javax.jcr.query.Query'], 'Java::JCR');

*XPATH = *Java::JCR::javax::jcr::query::Query::XPATH;
*SQL = *Java::JCR::javax::jcr::query::Query::SQL;

sub execute {
    my $self = shift;
    my @args = Java::JCR::Base::_process_args(@_);

    my $result = eval { $self->{obj}->execute(@args) };
    if ($@) { my $e = Java::JCR::Exception->new($@); croak $e }

    return Java::JCR::Base::_process_return($result, "javax.jcr.query.QueryResult", "Java::JCR::Query::QueryResult");
}

sub get_stored_query_path {
    my $self = shift;
    my @args = Java::JCR::Base::_process_args(@_);

    my $result = eval { $self->{obj}->getStoredQueryPath(@args) };
    if ($@) { my $e = Java::JCR::Exception->new($@); croak $e }

    return $result;
}

sub store_as_node {
    my $self = shift;
    my @args = Java::JCR::Base::_process_args(@_);

    my $result = eval { $self->{obj}->storeAsNode(@args) };
    if ($@) { my $e = Java::JCR::Exception->new($@); croak $e }

    return Java::JCR::Base::_process_return($result, "javax.jcr.Node", "Java::JCR::Node");
}

sub get_statement {
    my $self = shift;
    my @args = Java::JCR::Base::_process_args(@_);

    my $result = eval { $self->{obj}->getStatement(@args) };
    if ($@) { my $e = Java::JCR::Exception->new($@); croak $e }

    return $result;
}

sub get_language {
    my $self = shift;
    my @args = Java::JCR::Base::_process_args(@_);

    my $result = eval { $self->{obj}->getLanguage(@args) };
    if ($@) { my $e = Java::JCR::Exception->new($@); croak $e }

    return $result;
}

1;
__END__