java - How can I keep the relation between the Manager and the Server while the Manager has a relation to a reference? -


on project enables creation , management of calculation sheets, wherein each worksheet.

it has owner , 2 sets of users: can change spreadsheet , can read spreadsheet. every cell in spreadsheet can have literal content, reference cell of same sheet or function

now suppose if want add following requirements:

• application should support second type of reference: external reference.

in case, reference relates cell of spreadsheet.

the reference external represented id row;! col, id represents identifier spreadsheet containing desired cell (with row address; col).

so have source of code according domain:

class bubbledocs{     int nextdocumentid; }  class user {     string usertoken;     string username;     string password;     string name;     string email; }  class session {     datetime lastaccess; }  class spreadsheet {     int id;     string spreadsheetname;     string ownerusername;     localdate creationdate;     int numberrows;     int numbercolumns; }  class access { }  remotecellmanager {     int spreadsheetid;     bool updated; }  class cell {     int cellrow;     int cellcolumn;     boolean protect; } 

• scalability reasons, may happen application distributed on multiple servers, each responsible managing subset of leaves calculation.

for reason, external reference can not refer directly cell of worksheet may happen 2 sheets calculation in question (the 1 containing external reference , referenced in reference external) on different servers. resolve issue goes away consider new entity, remotecellmanager.

an instance of entity server , instance manage created external references in context of spreadsheets associated server.

so whenever external reference, new type of entity consider in field created, should recorded in entity. optimization reasons, each reference external keeps value of referenced external cell.

where cell changed, external references should updated. entity 'remotecellmanager' responsible performing update.

to solution should how entities 'remotecellmanager' information cell has changed , new value.

• performance reasons limited number of external references

they can created on server.

this number equal 100.

my solution problem based on having next source of code:

class externalreference {     int cellrow;     int cellcol;     int cellid; }  class remotecellmanager extends externalreference { }  relation serverhasexternalreference {     externalreference playsrole reference {         multiplicity 0..100;     } } 

my question is, how can make relation between manager , server while manager has relation reference?

to better understand relation between manager , server external reference approach using domain modeling language (dml):

class externalreference {     int cellrow;     int cellcol;     int cellid; }  class remotecellmanager extends externalreference { }  relation remotecellmanagerhasexternalreference {     remotecellmanager playsrole manager {         multiplicity 1..1;     }     externalreference playsrole reference {         multiplicity 0..100;     } } 

my idea, , based on did understand explanation, extend remotecellreference externalreference need code playsrole , multiplicity co-relation.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -