⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 javaclientsourceeof3.eotemplate

📁 EOmodeler 读取数据库的方法
💻 EOTEMPLATE
字号:
<$comment
EO Template for use by "eogenerator" based upon MiscMerge engine.
You may customize this file to modify the templates generated
by this tool.  See the MiscMerge documentation for a description
of the parsing language.  The engine gets passed this file and an
EOEntity to process, so the methods used must be ones that an
EOEntity can respond to.

BE SURE NOT TO INCLUDE DATES IN THIS FILE.  Since the "eogenerator"
tool tries to compare the newly generated file with the old file,
adding dates to this file will guarantee the old file gets
overridden by the new file, forcing a recompilation of your EO.$>
// <$GEN_PREFIX$><$clientClassNameWithoutPackage$>.java
// 
// Created by eogenerator
// DO NOT EDIT.  Make changes to <$clientClassNameWithoutPackage$>.java instead.

<$foreach package clientClassPackage do$>package <$package$>;
<$endforeach do
$>
import com.apple.client.foundation.*;
import com.apple.client.eocontrol.*;
import java.util.*;
import java.math.BigDecimal;

public class <$GEN_PREFIX$><$clientClassNameWithoutPackage$> extends EOCustomObject {
<$foreach attribute clientClassAttributes.@sortedNameArray do$>
    protected <$attribute.javaValueClassName$> <$attribute.name$>;<$endforeach
do$><$foreach ToOneRelationship clientClassToOneRelationships.@sortedNameArray do$>
    protected <$ToOneRelationship.destinationEntity.referenceClientClassName$> <$ToOneRelationship.name$>;<$endforeach
do$><$foreach ToManyRelationship clientClassToManyRelationships.@sortedNameArray do$>
    protected NSMutableArray <$ToManyRelationship.name$>;<$endforeach do$>

    // This is the constructor used by EOF.  Later (perhaps upon a willRead()) the
    // object will be populated with values via EOCustomObject's takeValueForKey()
    // method.
    public <$GEN_PREFIX$><$clientClassNameWithoutPackage$> (EOEditingContext context, EOClassDescription classDesc, EOGlobalID gid) {
        super(context, classDesc, gid);
    }
<$foreach attribute clientClassAttributes.@sortedNameArray do$>
    public <$attribute.javaValueClassName$> <$attribute.name$>() {
        willRead();
        return <$attribute.name$>;
    }

    public void set<$attribute.name.initialCapitalString$>(<$attribute.javaValueClassName$> aValue) {
        willChange();
        <$attribute.name$> = aValue;
    }
<$endforeach do
$><$foreach ToOneRelationship clientClassToOneRelationships.@sortedNameArray do$>
    public <$ToOneRelationship.destinationEntity.referenceClientClassName$> <$ToOneRelationship.name$>() {
        willRead();
        return <$ToOneRelationship.name$>;
    }

    public void set<$ToOneRelationship.name.initialCapitalString$>(<$ToOneRelationship.destinationEntity.referenceClientClassName$> aValue) {
        willChange();
        <$ToOneRelationship.name$> = aValue;
    }
<$endforeach do
$><$foreach ToManyRelationship clientClassToManyRelationships.@sortedNameArray do$>
    public NSArray <$ToManyRelationship.name$>() {
        willRead();
        return <$ToManyRelationship.name$>;
    }

    public void set<$ToManyRelationship.name.initialCapitalString$>(NSMutableArray aValue) {
        willChange();
        <$ToManyRelationship.name$> = aValue;
    }

    public void addTo<$ToManyRelationship.name.initialCapitalString$>(<$ToManyRelationship.destinationEntity.referenceClientClassName$> object) {
        willChange();
        <$ToManyRelationship.name$>.addObject(object);
    }

    public void removeFrom<$ToManyRelationship.name.initialCapitalString$>(<$ToManyRelationship.destinationEntity.referenceClientClassName$> object) {
        willChange();
        <$ToManyRelationship.name$>.removeObject(object);
    }
<$endforeach do$>
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -