本文整理汇总了Java中org.springframework.data.annotation.PersistenceConstructor类的典型用法代码示例。如果您正苦于以下问题:Java PersistenceConstructor类的具体用法?Java PersistenceConstructor怎么用?Java PersistenceConstructor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PersistenceConstructor类属于org.springframework.data.annotation包,在下文中一共展示了PersistenceConstructor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Document
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public Document(
String id,
String name,
LocalDate deadline,
DocumentStatus status,
String projectId,
String notificationSchemaId,
String assigneeId) {
super();
this.id = id;
this.name = name;
this.deadline = deadline;
this.status = status;
this.projectId = projectId;
this.notificationSchemaId = notificationSchemaId;
this.assigneeId = assigneeId;
}
示例2: OAuth2AuthenticationAccessToken
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
/**
* Construct an access token.
*/
@PersistenceConstructor
public OAuth2AuthenticationAccessToken(OAuth2AccessToken oauth2AccessToken,
OAuth2Authentication authentication, String authenticationId) {
this.id = UUID.randomUUID()
.toString();
this.tokenId = oauth2AccessToken.getValue();
this.oauth2AccessToken = oauth2AccessToken;
this.authenticationId = authenticationId;
this.userName = authentication.getName();
this.clientId = authentication.getOAuth2Request()
.getClientId();
this.authentication = authentication;
this.refreshToken = oauth2AccessToken.getRefreshToken()
.getValue();
}
示例3: User
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public User(final String id, String userName, long createTime, long lastLoginTime,
double[] location, String firstName, String lastName, String emailAddress,
String imageUrl, String displayName, final String credential) {
this.userName = userName;
this.id = id;
this.createTime = createTime;
this.lastLoginTime = lastLoginTime;
this.location = location;
this.firstName = firstName;
this.lastName = lastName;
this.emailAddress = emailAddress;
this.imageUrl = imageUrl;
this.displayName = displayName;
this.credential = credential;
}
示例4: MongoClientDetails
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public MongoClientDetails(final String clientId,
final String clientSecret,
final Set<String> scope,
final Set<String> resourceIds,
final Set<String> authorizedGrantTypes,
final Set<String> registeredRedirectUris,
final List<GrantedAuthority> authorities,
final Integer accessTokenValiditySeconds,
final Integer refreshTokenValiditySeconds,
final Map<String, Object> additionalInformation,
final Set<String> autoApproveScopes) {
this.clientId = clientId;
this.clientSecret = clientSecret;
this.scope = scope;
this.resourceIds = resourceIds;
this.authorizedGrantTypes = authorizedGrantTypes;
this.registeredRedirectUris = registeredRedirectUris;
this.authorities = authorities;
this.accessTokenValiditySeconds = accessTokenValiditySeconds;
this.refreshTokenValiditySeconds = refreshTokenValiditySeconds;
this.additionalInformation = additionalInformation;
this.autoApproveScopes = autoApproveScopes;
}
示例5: MongoApproval
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public MongoApproval(final String id,
final String userId,
final String clientId,
final String scope,
final ApprovalStatus status,
final LocalDate expiresAt,
final LocalDate lastUpdatedAt) {
this.id = id;
this.userId = userId;
this.clientId = clientId;
this.scope = scope;
this.status = status;
this.expiresAt = expiresAt;
this.lastUpdatedAt = lastUpdatedAt;
}
示例6: MongoOAuth2AccessToken
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public MongoOAuth2AccessToken(final String tokenId,
final byte[] token,
final String authenticationId,
final String username,
final String clientId,
final byte[] authentication,
final String refreshToken) {
this.tokenId = tokenId;
this.token = token;
this.authenticationId = authenticationId;
this.username = username;
this.clientId = clientId;
this.authentication = authentication;
this.refreshToken = refreshToken;
}
示例7: User
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public User(final String password,
final String username,
final UUID userUUID,
final Set<GrantedAuthority> authorities,
final boolean accountNonExpired,
final boolean accountNonLocked,
final boolean credentialsNonExpired,
final boolean enabled) {
this.password = password;
this.username = username;
this.userUUID = userUUID;
this.authorities = authorities;
this.accountNonExpired = accountNonExpired;
this.accountNonLocked = accountNonLocked;
this.credentialsNonExpired = credentialsNonExpired;
this.enabled = enabled;
}
示例8: User
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public User(String userId, String username, String password, String name, String email,
Date registrationDate, Set<String> roles, boolean accountNonExpired, boolean accountNonLocked,
boolean enabled, boolean credentialsNonExpired) {
this.userId = userId;
this.username = username;
this.password = password;
this.name = name;
this.email = email;
this.registrationDate = registrationDate;
this.roles = roles;
this.accountNonExpired = accountNonExpired;
this.accountNonLocked = accountNonLocked;
this.enabled = enabled;
this.credentialsNonExpired = credentialsNonExpired;
}
示例9: Employee
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public Employee(Long id, BigInteger _id, Long empid, String firstname, String lastname, Long age, String email,
Date birthday, Long deptid) {
super();
this.id = id;
this._id = _id;
this.empid = empid;
this.firstname = firstname;
this.lastname = lastname;
this.age = age;
this.email = email;
this.birthday = birthday;
this.deptid = deptid;
}
示例10: Department
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public Department(BigInteger _id, Long id, Long deptid, String name) {
super();
this._id = _id;
this.id = id;
this.deptid = deptid;
this.name = name;
}
示例11: CalendarUser
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public CalendarUser(Integer id, String email, String password, String firstName, String lastName) {
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.password = password;
}
示例12: Event
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
/**
* Event Constructor
* @param id
* @param summary
* @param description
* @param when
* @param owner
* @param attendee
*/
@PersistenceConstructor
public Event(Integer id,
String summary,
String description,
Calendar when,
CalendarUser owner,
CalendarUser attendee) {
this.id = id;
this.summary = summary;
this.description = description;
this.when = when;
this.owner = owner;
this.attendee = attendee;
}
示例13: Order
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
/**
* Creates a new {@link Order} for the given {@link Customer}, shipping and billing {@link Address}.
*
* @param customer must not be {@literal null}.
* @param shippingAddress must not be {@literal null}.
* @param billingAddress can be {@literal null}.
*/
@PersistenceConstructor
public Order(Customer customer, Address shippingAddress, Address billingAddress) {
Assert.notNull(customer);
Assert.notNull(shippingAddress);
this.customer = customer;
this.shippingAddress = shippingAddress;
this.billingAddress = billingAddress;
}
示例14: Product
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
/**
* Creates a new {@link Product} from the given name and description.
*
* @param name must not be {@literal null} or empty.
* @param price must not be {@literal null} or less than or equal to zero.
* @param description
*/
@PersistenceConstructor
public Product(String name, BigDecimal price, String description) {
Assert.hasText(name, "Name must not be null or empty!");
Assert.isTrue(BigDecimal.ZERO.compareTo(price) < 0, "Price must be greater than zero!");
this.name = name;
this.price = price;
this.description = description;
}
示例15: OAuth2AuthenticationAccessToken
import org.springframework.data.annotation.PersistenceConstructor; //导入依赖的package包/类
@PersistenceConstructor
public OAuth2AuthenticationAccessToken(OAuth2AccessToken oAuth2AccessToken, OAuth2Authentication authentication, String authenticationId) {
this.id = UUID.randomUUID().toString();
this.tokenId = oAuth2AccessToken.getValue();
this.oAuth2AccessToken = oAuth2AccessToken;
this.authenticationId = authenticationId;
this.userName = authentication.getName();
this.clientId = authentication.getOAuth2Request().getClientId();
this.authentication = authentication;
if(oAuth2AccessToken.getRefreshToken() != null) {
this.refreshToken = oAuth2AccessToken.getRefreshToken().getValue();
}
}