Example usage for org.springframework.data.jpa.domain Specification getClass

List of usage examples for org.springframework.data.jpa.domain Specification getClass

Introduction

In this page you can find the example usage for org.springframework.data.jpa.domain Specification getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.fao.geonet.kernel.datamanager.base.BaseMetadataUtils.java

@SuppressWarnings("unchecked")
@Override//  ww  w.  j  av  a  2s .  c  om
public List<Integer> findAllIdsBy(Specification<? extends AbstractMetadata> specs) {
    try {
        return metadataRepository.findAllIdsBy((Specification<Metadata>) specs);
    } catch (Throwable t) {
        // Maybe it is not a Specification<Metadata>
    }
    throw new NotImplementedException("Unknown IMetadata subtype: " + specs.getClass().getName());
}

From source file:org.fao.geonet.kernel.datamanager.base.BaseMetadataUtils.java

@SuppressWarnings("unchecked")
@Override/*from   ww w . ja  v  a 2  s . c o m*/
public long count(Specification<? extends AbstractMetadata> specs) {
    try {
        return metadataRepository.count((Specification<Metadata>) specs);
    } catch (Throwable t) {
        // Maybe it is not a Specification<Metadata>
    }
    throw new NotImplementedException("Unknown IMetadata subtype: " + specs.getClass().getName());
}

From source file:org.fao.geonet.kernel.datamanager.base.BaseMetadataUtils.java

@SuppressWarnings("unchecked")
@Override/*ww  w  .j  av  a  2s. c  om*/
public List<? extends AbstractMetadata> findAll(Specification<? extends AbstractMetadata> specs) {
    try {
        return metadataRepository.findAll((Specification<Metadata>) specs);
    } catch (Throwable t) {
        // Maybe it is not a Specification<Metadata>
    }
    throw new NotImplementedException("Unknown IMetadata subtype: " + specs.getClass().getName());
}

From source file:org.fao.geonet.kernel.datamanager.base.BaseMetadataUtils.java

@SuppressWarnings("unchecked")
@Override//from w ww.j  ava2s .c  o m
public Element findAllAsXml(Specification<? extends AbstractMetadata> specs, Sort sortByChangeDateDesc) {
    try {
        return metadataRepository.findAllAsXml((Specification<Metadata>) specs, sortByChangeDateDesc);
    } catch (Throwable t) {
        // Maybe it is not a Specification<Metadata>
    }
    throw new NotImplementedException("Unknown IMetadata subtype: " + specs.getClass().getName());
}

From source file:org.fao.geonet.kernel.datamanager.base.BaseMetadataUtils.java

@SuppressWarnings("unchecked")
@Override// www.  j ava  2 s .  c o m
public Element findAllAsXml(@Nullable Specification<? extends AbstractMetadata> specs,
        @Nullable Pageable pageable) {
    try {
        return metadataRepository.findAllAsXml((Specification<Metadata>) specs, pageable);
    } catch (Throwable t) {
        // Maybe it is not a Specification<Metadata>
    }
    throw new NotImplementedException("Unknown IMetadata subtype: " + specs.getClass().getName());
}