All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bugvm.apple.coredata.NSFetchedResultsController Maven / Gradle / Ivy

/*
 * Copyright (C) 2013-2015 RoboVM AB
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bugvm.apple.coredata;

/**/
import java.io.*;
import java.nio.*;
import java.util.*;
import com.bugvm.objc.*;
import com.bugvm.objc.annotation.*;
import com.bugvm.objc.block.*;
import com.bugvm.rt.*;
import com.bugvm.rt.annotation.*;
import com.bugvm.rt.bro.*;
import com.bugvm.rt.bro.annotation.*;
import com.bugvm.rt.bro.ptr.*;
import com.bugvm.apple.foundation.*;
/**/

/**/
/**
 * @since Available in iOS 3.0 and later.
 */
/**/
/**/@Library("CoreData") @NativeClass/**/
/**/public/**/ class /**/NSFetchedResultsController/**/ 
    extends /**/NSObject/**/ 
    /**//**/ {

    /**/public static class NSFetchedResultsControllerPtr extends Ptr {}/**/
    /**/static { ObjCRuntime.bind(NSFetchedResultsController.class); }/**/
    /**//**/
    /**/
    public NSFetchedResultsController() {}
    protected NSFetchedResultsController(SkipInit skipInit) { super(skipInit); }
    public NSFetchedResultsController(NSFetchRequest fetchRequest, NSManagedObjectContext context, String sectionNameKeyPath, String name) { super((SkipInit) null); initObject(init(fetchRequest, context, sectionNameKeyPath, name)); }
    /**/
    /**/
    @Property(selector = "fetchRequest")
    public native NSFetchRequest getFetchRequest();
    @Property(selector = "managedObjectContext")
    public native NSManagedObjectContext getManagedObjectContext();
    @Property(selector = "sectionNameKeyPath")
    public native String getSectionNameKeyPath();
    @Property(selector = "cacheName")
    public native String getCacheName();
    @Property(selector = "delegate")
    public native NSFetchedResultsControllerDelegate getDelegate();
    @Property(selector = "setDelegate:", strongRef = true)
    public native void setDelegate(NSFetchedResultsControllerDelegate v);
    @Property(selector = "fetchedObjects")
    public native NSArray getFetchedObjects();
    @Property(selector = "sectionIndexTitles")
    public native @com.bugvm.rt.bro.annotation.Marshaler(NSArray.AsStringListMarshaler.class) List getSectionIndexTitles();
    @Property(selector = "sections")
    public native @com.bugvm.rt.bro.annotation.Marshaler(NSArray.AsListMarshaler.class) List getSections();
    /**/
    /**//**/
    /**/
    @Method(selector = "initWithFetchRequest:managedObjectContext:sectionNameKeyPath:cacheName:")
    protected native @Pointer long init(NSFetchRequest fetchRequest, NSManagedObjectContext context, String sectionNameKeyPath, String name);
    public boolean performFetch() throws NSErrorException {
       NSError.NSErrorPtr ptr = new NSError.NSErrorPtr();
       boolean result = performFetch(ptr);
       if (ptr.get() != null) { throw new NSErrorException(ptr.get()); }
       return result;
    }
    @Method(selector = "performFetch:")
    private native boolean performFetch(NSError.NSErrorPtr error);
    @Method(selector = "objectAtIndexPath:")
    public native NSObject getObjectAtIndexPath(NSIndexPath indexPath);
    @Method(selector = "indexPathForObject:")
    public native NSIndexPath getIndexPathForObject(NSObject object);
    @Method(selector = "sectionIndexTitleForSectionName:")
    public native String getSectionIndexTitleForSectionName(String sectionName);
    @Method(selector = "sectionForSectionIndexTitle:atIndex:")
    public native @MachineSizedSInt long getSectionForIndexTitle(String title, @MachineSizedSInt long sectionIndex);
    @Method(selector = "deleteCacheWithName:")
    public static native void deleteCache(String name);
    /**/
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy