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

com.bugvm.apple.cloudkit.CKRecord Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
/*
 * 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.cloudkit;

/**/
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.*;
import com.bugvm.apple.corelocation.*;
import com.bugvm.apple.contacts.*;
/**/

/**/
/**
 * @since Available in iOS 8.0 and later.
 */
/**/
/**/@Library("CloudKit") @NativeClass/**/
/**/public/**/ class /**/CKRecord/**/ 
    extends /**/NSObject/**/ 
    /**//**/ {

    /**/public static class CKRecordPtr extends Ptr {}/**/
    /**/static { ObjCRuntime.bind(CKRecord.class); }/**/
    /**//**/
    /**/
    public CKRecord() {}
    protected CKRecord(SkipInit skipInit) { super(skipInit); }
    public CKRecord(String recordType) { super((SkipInit) null); initObject(init(recordType)); }
    public CKRecord(String recordType, CKRecordID recordID) { super((SkipInit) null); initObject(init(recordType, recordID)); }
    public CKRecord(String recordType, CKRecordZoneID zoneID) { super((SkipInit) null); initObject(init(recordType, zoneID)); }
    /**/
    /**/
    @Property(selector = "recordType")
    public native String getRecordType();
    @Property(selector = "recordID")
    public native CKRecordID getRecordID();
    @Property(selector = "recordChangeTag")
    public native String getRecordChangeTag();
    @Property(selector = "creatorUserRecordID")
    public native CKRecordID getCreatorUserRecordID();
    @Property(selector = "creationDate")
    public native NSDate getCreationDate();
    @Property(selector = "lastModifiedUserRecordID")
    public native CKRecordID getLastModifiedUserRecordID();
    @Property(selector = "modificationDate")
    public native NSDate getModificationDate();
    /**/
    /**//**/
    public void put(String key, String object) {
        put(key, new NSString(object));
    }
    public void put(String key, NSString object) {
        put(object, key);
    }
    public void put(String key, Number object) {
        put(key, NSNumber.valueOf(object));
    }
    public void put(String key, NSNumber object) {
        put(object, key);
    }
    public void put(String key, NSData object) {
        put(object, key);
    }
    public void put(String key, NSDate object) {
        put(object, key);
    }
    @WeaklyLinked
    public void put(String key, CLLocation object) {
        put(object, key);
    }
    public void put(String key, CKAsset object) {
        put(object, key);
    }
    public void put(String key, CKReference object) {
        put(object, key);
    }
    public void put(String key, NSArray object) {
        put(object, key);
    }
    public void put(String key, List object) {
        put(NSArray.fromStrings(object), key);
    }
    /**/
    @Method(selector = "initWithRecordType:")
    protected native @Pointer long init(String recordType);
    @Method(selector = "initWithRecordType:recordID:")
    protected native @Pointer long init(String recordType, CKRecordID recordID);
    @Method(selector = "initWithRecordType:zoneID:")
    protected native @Pointer long init(String recordType, CKRecordZoneID zoneID);
    @Method(selector = "objectForKey:")
    public native NSObject get(String key);
    @Method(selector = "setObject:forKey:")
    protected native void put(NSObject object, String key);
    @Method(selector = "allKeys")
    public native @com.bugvm.rt.bro.annotation.Marshaler(NSArray.AsStringListMarshaler.class) List getAllKeys();
    @Method(selector = "allTokens")
    public native @com.bugvm.rt.bro.annotation.Marshaler(NSArray.AsStringListMarshaler.class) List getAllTokens();
    @Method(selector = "changedKeys")
    public native @com.bugvm.rt.bro.annotation.Marshaler(NSArray.AsStringListMarshaler.class) List getChangedKeys();
    @Method(selector = "encodeSystemFieldsWithCoder:")
    public native void encodeSystemFields(NSCoder coder);
    /**/
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy