小编Bij*_*jou的帖子

冻结Rails版本/宝石有什么意义?

那是什么意思?

在一个项目的说明中,它说"冻结Rails宝石".这与冻结Rails版本有什么不同?

什么是冷冻的?

ruby rubygems ruby-on-rails freeze

10
推荐指数
1
解决办法
2055
查看次数

这些Java注释有什么功能?

我还不清楚Java中注释的目的.最初我认为他们只是作为文档.但是从Google App Engine数据存储区查看此文档,我不太确定.@PersistenceCapable(identityType = IdentityType.APPLICATION)看起来更像是方法签名.

这种注释的目的是什么?它有什么作用?

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Employee {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private String firstName;

    @Persistent
    private String lastName;

    @Persistent
    private Date hireDate;

    public Employee(String firstName, String lastName, Date hireDate) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.hireDate = hireDate;
    }

    // Accessors for the fields.  JDO doesn't use these, but your application does.

    public …
Run Code Online (Sandbox Code Playgroud)

java annotations

7
推荐指数
1
解决办法
1400
查看次数

标签 统计

annotations ×1

freeze ×1

java ×1

ruby ×1

ruby-on-rails ×1

rubygems ×1