Proxy Design Pattern in Java

preview_player
Показать описание
Learn: Properties & Implementation with example in Java of Proxy Design Pattern

Do Watch video for more info

This Problem is synonym of following problems:
Proxy design pattern java,
real time example for Proxy design pattern in java,
when to use Proxy design pattern,
Proxy design pattern in java,
Proxy design pattern in spring,
design patterns in java,
Proxy design pattern implememt

Please check video for more info:

CHECK OUT CODING SIMPLIFIED

★☆★ VIEW THE BLOG POST: ★☆★

I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 200+ videos.

★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★

★☆★ Send us mail at: ★☆★

Рекомендации по теме
Комментарии
Автор

Minor update in Code in video: In constructor on line 22, it'll be out of if loop:

public DatabaseExecuterProxy(String name, String passwd) {
ifAdmin = true;
}
dbExecuter = new DatabaseExecuterImpl();
}

CodingSimplified
Автор

What ever logic we are writing in proxy class can be implemented in the method executeDatabase right by passing the username and password along with query to method . Why to go for another class ? Any specific advantages by writing the code seperately ?

vanamasaiharshapavan
Автор

Thanks for the explanation.
Just info, line: 34 will throw NullPointerException in case you're testing non-admin user with operation other than "DELETE".

VLADICAKG
Автор

I think constructor should be like this..
public DBExecutorProxy(String name, String password) {
if (name.equals("abhi") && password.equals("abhi")) {
this.isAdmin = true;
}
this.dbExecutor = new DBExecutorImpl();
}

abhishekprasad
Автор

Proxy dp were used in hibernate I think, can you please include that examples.

parmarkamlesh
Автор

I am still getting error for non admin as non-zero exit value?

akulavenkatasainath
Автор

Why you're comparing string using == instead of .equals??

jijeshvu
Автор

dbexecutor will throw null pointer exception as you are not initialising it in case of non admin

shalinsharma
join shbcf.ru