Questions tagged [class-level]
7 questions
7
votes
2 answers
Custom class level bean validation constraint
I already know how to add annotation based validation on specific attributes in Entity class like :-
public class Person {
@NotNull
private String firstName;
private String lastName;
//...
}
But is it possible to add annotation…

AnkeyNigam
- 2,810
- 4
- 15
- 23
6
votes
4 answers
Behaviour of local and class variables in java
I am new in Java Programming language.
I am familiar with C and C++ but unable to understand the behaviour of the below program.
public class Test {
static int x = 11;
private int y = 33;
public void method1(int x) {
Test t =…

Bhawan
- 2,441
- 3
- 22
- 47
4
votes
1 answer
Validate class level bean validation constraints in JSF
It seems that JSF 2.0 does not call "class level constraints". Quoting from an SO answer
JSF 2.0 doesn't call class level validation constraints. From JSF validation: JSF 2 provides built-in integration with JSR-303 constraints. When you are using…

Vogel612
- 5,620
- 5
- 48
- 73
1
vote
0 answers
python get all class level attributes on an instance, including parent class
I'm trying to get all the class level attributes on a python instance, but when I access the class dictionary (inst.__class__.__dict__), I won't get the class level attributes from the parent type
ex:
class Parent:
var1 = ''
class…

Cethyrion
- 31
- 4
0
votes
1 answer
Why do I get an extra trailing space and how to get rid of it?
I am new to ruby and I can't understand why I after running this code I get an extra empty line as a result as a part of the output. I am using Ruby 2.5.3
class Card
attr_accessor :rank, :suit
def initialize(rank,suit)
@rank = rank
…
0
votes
4 answers
calling a method by class level annotated with @RequestMapping that includes an autowired class
I am trying to call a method that is annotated with @RequestMapping(signIn) through a class level (from method: authentication) like so:
@RequestMapping(value = /authenticate, method = RequestMethod.POST)
public @ResponseBody Response…

Juni
- 79
- 2
- 7
0
votes
0 answers
custom bean validation for jsf form?
I have implemented a custom bean validator, with its custom annotation, for an entity, to code some non-trivial multiple-field validation logic that is needed.
I also have a JSF form associated with such entity. Single-field bean validation…

karmapolice
- 326
- 2
- 11